Skip to content
Discussion options

You must be logged in to vote

Follow the TS usage guidelines shown in our docs for inferring the type of dispatch from your store, and using pre-typed hooks. Also note that the store setup works best if you're using Redux Toolkit's configureStore (which you should be using anyway):

https://react-redux.js.org/using-react-redux/usage-with-typescript#define-root-state-and-dispatch-types

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Silence-dream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants