Skip to content

Commit 14cd8e1

Browse files
authored
Update actions.ts to reflec the AsyncAction type
For actions there is a type called `AsyncAction` this can be use for async functions.
1 parent a8c8ab4 commit 14cd8e1

File tree

1 file changed

+2
-2
lines changed
  • packages/overmind-website/examples/api

1 file changed

+2
-2
lines changed

packages/overmind-website/examples/api/action.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ export default (ts) =>
33
? [
44
{
55
code: `
6-
import { Action } from 'overmind'
6+
import { AsyncAction } from 'overmind'
77
8-
export const getPosts: Action = async ({ state, actions, effects }) => {
8+
export const getPosts: AsyncAction = async ({ state, actions, effects }) => {
99
state.isLoadingPosts = true
1010
state.posts = await effects.api.getPosts()
1111
state.isLoadingPosts = false

0 commit comments

Comments
 (0)