Skip to content

v5.0.0-rc.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@markerikson markerikson released this 23 Nov 19:38
· 214 commits to master since this release

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 could 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 unknown and you need to use a type guard to tell TS that the current value is actually an action:

We've also exported the isPlainObject util that's been in the Redux codebase for years as well.

What's Changed

Full Changelog: v5.0.0-rc.0...v5.0.0-rc.1