Use RootState in AppDispatch type

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
settings-alert
marcin mikołajczak 2022-06-18 11:34:38 +02:00
rodzic cfacc23f5c
commit 47b67df323
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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>;