unstale

npm / @reduxjs/toolkit

@reduxjs/toolkit

What changed in @reduxjs/toolkit 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

5 breaking4 new APIs and options1 performance4 behavior and defaults32 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

@reduxjs/toolkit 246 changes

Breaking changes 5

  • Aborts that happen before the pending action is dispatched are no longer swallowed.

    2.13.0release notes

  • RTK now uses TypeScript's built-in NoInfer utility, which is available with TypeScript 5.4 and later.

    2.12.0release notes

  • RTK calls setUseStrictIteration(false), so Immer copies only string keys in objects by default for RTK updates, improving performance; apps using symbol keys can call setUseStrictIteration(true) to restore the previous behavior.

    2.10.0release notes

  • Initiates requests without adding a subscription, so cache entries remain only for the keepUnusedDataFor period unless the app subscribes.

    2.9.2release notes

  • Dispatching resetApiState now aborts all in-flight requests.

    2.9.2release notes

New APIs and options 4

  • The infinite query hook result type now includes the page error flags.

    2.13.0release notes

  • RTK Query hook options types are exported for reuse, so you no longer need to extract them with Parameters.

    2.12.0release notes

  • The RTK package now includes agent skill files for using and migrating to modern RTK, managing client and server state, and handling side effects.

    2.12.0release notes

  • Adds an option for infinite queries that, when false, refetches only the first cached page and shrinks the cache from N pages to 1.

    2.11.0release notes

Performance 1

  • Composed middleware chains are cached when the middleware list has not changed.

    2.13.0release notes

Behavior and default changes 4

  • The sorted adapter merges multiple updates for the same ID before applying them.

    2.13.0release notes

  • Listener middleware matcher types now accept interface-based type guards as well as type-based definitions.

    2.12.0release notes

  • Sets the accept header based on the selected responseHandler, choosing JSON or text.

    2.9.2release notes

  • Stops retrying when the request's AbortSignal is aborted.

    2.9.2release notes

Fixes and other changes 32

  • Its internal state proxy cache is now scoped per instance, preventing multiple combined reducers from interfering with each other.

    2.13.0release notes

  • rejectedWithValue is now set correctly when rejectWithValue is called with a falsy payload.

    2.13.0release notes

  • setAll keeps the last item when given duplicate IDs, matching setMany.

    2.13.0release notes

  • A URL is treated as absolute only when it starts with a scheme.

    2.13.0release notes

  • The middleware now handles circular references in state.

    2.13.0release notes

  • Fetching past the end of an infinite query list no longer triggers onQueryStarted.

    2.13.0release notes

  • Lazy query hooks now re-subscribe when effects restart while hook state is preserved, such as with Fast Refresh or Activity.

    2.13.0release notes

  • Polling checks current cache state when each poll fires, so focus loss after scheduling is respected and polling stops if the cache entry was removed.

    2.13.0release notes

  • Rehydrating state no longer errors when an endpoint name has no definition.

    2.13.0release notes

  • Tags with falsy IDs, such as 0, now invalidate and clean up correctly.

    2.13.0release notes

  • Queued tag invalidations are no longer run too early and lost when a duplicate query request is rejected by the thunk condition.

    2.13.0release notes

  • RTK now supports TypeScript 7.0 and 7.1. The tested support matrix is TypeScript 5.6+.

    2.13.0release notes

  • data now reflects updateQueryData cache changes made while a refetch is in flight.

    2.13.0release notes

  • isSuccess now stays false during an unrelated re-render while a query is refetching after an error.

    2.13.0release notes

  • The enhancer's requestAnimationFrame timer now has a 100ms timeout fallback so updates flush when rAF does not work in background tabs or opened windows.

    2.12.0release notes

  • The isSuccess status flag stays true when switching infinite query cache entries, preventing accidental UI flashes.

    2.12.0release notes

  • AbortSignal handling falls back to a plain Error when DOMException is unavailable, including in React Native environments.

    2.11.2release notes

  • The type now correctly includes the fetchNextPage and fetchPreviousPage fields.

    2.11.2release notes

  • Reworked AbortController handling to avoid an error in a rare case involving resetApiState and retry().

    2.11.1release notes

  • Fixes the immutability development middleware so regex values in ignoredPaths are tested as regexes rather than treated as strings.

    2.11.0release notes

  • Fixes an issue where byte-shaving work in 2.10 caused window access to break in SSR.

    2.10.1release notes

  • Improves type inference when PreloadedState might not match the incoming type, such as with persisted values.

    2.10.0release notes

  • Fixes the calculation of whether a request is active when checking for cache entry cleanup.

    2.9.2release notes

  • Does not set the content-type header for non-JSONifiable request bodies such as FormData, allowing the browser to set it.

    2.9.2release notes

  • Returns unknown errors as {error} instead of rethrowing them, as a base query is supposed to.

    2.9.2release notes

  • Respects maxRetries when retrying after unknown errors, as it already did for known errors.

    2.9.2release notes

  • Internal subscription data is per-store again, preventing subscription IDs from appearing across SSR requests.

    2.9.2release notes

  • Initiates requests without adding a subscription, so cache entries remain only for the keepUnusedDataFor period unless the app subscribes.

    2.9.2release notes

  • Sorted entity adapters now keep the first occurrence when addMany receives duplicate IDs.

    2.9.1release notes

  • RTK Query types ensure data is non-undefined when isSuccess is true, including with exactOptionalPropertyTypes.

    2.9.1release notes

  • clearListeners can cancel effects that have become unsubscribed.

    2.9.1release notes

  • Sorted entity adapters now keep only unique IDs in state.ids when setMany receives duplicate IDs.

    2.9.1release notes