Skip to content

Commit

Permalink
Export AppDispatch type in TS page
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed May 12, 2024
1 parent ef57856 commit 67e60e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/tutorials/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ export const store = configureStore({
})

// highlight-start
// Infer the `RootState` and `AppDispatch` types from the store itself
// Infer the `RootState`, `AppDispatch`, and `AppStore` types from the store itself
export type RootState = ReturnType<typeof store.getState>
// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
export type AppDispatch = typeof store.dispatch
export type AppStore = typeof store
// highlight-end
```
Expand Down

0 comments on commit 67e60e6

Please sign in to comment.