3 ms·
Note that our official Redux Toolkit package, linked in the article, has complex TS types specifically _because_ we work to simplify the TS usage experience for
by acemarke 4y ago
Note that our official Redux Toolkit package, linked in the article, has complex TS types specifically _because_ we work to simplify the TS usage experience for our users.
Here's all you need to do as a typical Redux app developer to get started using Redux Toolkit with TypeScript:
- https://redux.js.org/tutorials/typescript-quick-start https://redux.js.org/tutorials/typescript-quick-start
Note that we specifically tell you to use a `PayloadAction<MyPayloadHere>` type, which results in well-typed reducers and automatically generates strongly-typed action creators to match.
If you're using Redux at all, you _should_ be using Redux Toolkit to write your Redux logic.