v5.0.0-rc.1
This release candidate adds a new isAction predicate that can be used as a TS type guard, and exports the existing internal isPlainObject util.
Note that we hope to release Redux Toolkit 2.0, Redux core 5.0, and React-Redux 9.0 by the start of December! (If we don't hit that, we'll aim for January, after the holidays.)
See the preview Redux Toolkit 2.0 + Redux core 5.0 Migration Guide for an overview of breaking changes in RTK 2.0 and Redux core.
npm install redux@next
yarn add redux@next
Changes
isAction Predicate
We recently added an isAction predicate to RTK, then realized it's better suited for the Redux core. This can be used anywhere you have a value that be a Redux action object, and you need to check if it is actually an action. This is specifically useful for use with the updated Redux middleware TS types, where the default value is now and you need to use a type guard to tell TS that the current value is actually an action: