Packages

@reduxjs/toolkit

2.13.0 · 29 Sep 2026MIT45.8M / weekRepositoryHomepagenpmAtom feed

Your version

2.2.7

27 Jul 2024Where it was published

2.13.0 is the newest release of 2.x.

In short

1 new1 fixed6 changed

Release note

This bugfix release fixes issues with "TS type portability" errors, improves build artifact tree shaking behavior, and exports some additional TS types.

Changelog

TS Type Portability

We've had a slew of issues reported around "TS type portability" errors, such as:

The error messages are typically along the lines of:

Type error: The inferred type of 'configureStore' cannot be named without a reference to '@reduxjs/toolkit/node_modules/redux'. This is likely not portable. A type annotation is necessary.

@aryaemami59 did some deep investigation and concluded these were due to a mixture of using interface instead of type in most places, not pre-bundling our TS typedefs, and not exporting some of the unique symbols we use internally.

Arya put together a highly detailed writeup and set of fixes in #4467: Fix: TypeScript Type Portability Issues, and that appears to resolve all of those issues we've seen. Thank you!

Other Changes

Arya also did significant work to improve RTK's treeshaking, tweaking internal definitions to let bundlers better separate out unused code.

We've exported additional types like UpdateDefinitions and RetryOptions, per request.

listenerMiddleware.withTypes() methods now allow passing in an ExtraArgument generic.

What's Changed

  • TypeScript Type Portability Issues

  • Export UpdateDefinitions from toolkit/query

  • Adds ExtraArgument to withTypes for listenerMiddleware.

  • Improve treeshakeability of build artifacts

  • Export RetryOptions