TypeScript and Redux¶
How to type the root state?¶
DefaultRootState
RootStateOrAny
Typed useSelector
¶
export interface ReduxState {
key: value;
// ...
}
export const useStoreSelector: TypedUseSelectorHook<ReduxState> = useSelector;
Last update:
2023-04-24