AFAICT this will have the most impact on folks using Typescript with Redux stores and similar dispatchers.I know I would have liked having this feature back when I was doing that work.
AFAICT this will have the most impact on folks using Typescript with Redux stores and similar dispatchers.I know I would have liked having this feature back when I was doing that work.
Additionally, RTK has been designed to work great with TypeScript. Typically all you need to declare is the type of the state for that slice, and the payload for each reducer's action, and everything else is inferred.
See our Redux docs tutorials for details:
https://redux.js.org/tutorials/essentials/part-2-app-structu...
https://redux.js.org/tutorials/fundamentals/part-8-modern-re...
Like `if (action.kind === 'x')` / `switch (action.kind)`.
This "only" extends support to destructured discriminators.
Definitely nice to have, but of limited impact.