Use RootState in AppDispatch type
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
cfacc23f5c
commit
47b67df323
1 changed files with 1 additions and 1 deletions
|
@ -22,4 +22,4 @@ export type Store = typeof store;
|
|||
// Infer the `RootState` and `AppDispatch` types from the store itself
|
||||
// https://redux.js.org/usage/usage-with-typescript
|
||||
export type RootState = ReturnType<typeof store.getState>;
|
||||
export type AppDispatch = ThunkDispatch<{}, {}, AnyAction>;
|
||||
export type AppDispatch = ThunkDispatch<RootState, {}, AnyAction>;
|
||||
|
|
Loading…
Reference in a new issue