@reduxjs/toolkit
2.15.0 · 18 Nov 2026MIT51.3M / weekRepositoryHomepagenpmAtom feed
Upgrading @reduxjs/toolkit From 1.9.7 to 2.15.0
34 releases in betweennotes for 32
Reading releases, release notes and advisories…
- 9+
- changes to make
- 0
- advisories fixed
- 30+
- new
- 61+
- fixes
Counted from 32 of 34 release notes. Advisories are counted from the advisory database, in full.
Start here
Before you upgrade
Tick each one off as you go- Breaking2.14.0
- Breaking2.12.0
- Breaking2.0.0
- Breaking2.0.0
- Breaking2.0.0
- Breaking2.0.0
- Breaking2.0.0
- Deprecated2.15.0
- Deprecated2.14.0
Release by release
- Deprecated
The hooks use
isSubscribed()now, and don't dispatch anything to check subscriptions. Theinternal_getRTKQSubscriptionsaction is deprecated. It still works in 2.x, but logs a one-time dev warning and will be removed in 3.0. - Fixed
refetchOnMountOrArgChange: 0andforceRefetch: 0now always refetch. Before,0disabled the option. - Fixed
refetchOnFocusandrefetchOnReconnectrefetch a shared query if any subscriber's own or inherited setting istrue. One subscriber'sfalseno longer turns it off for the others. - Fixed
Polling skips while unfocused only if every polling subscriber sets
skipPollingIfUnfocused. Non-polling subscribers don't affect this.
- Deprecated
- Breaking
Note that we just announced our roadmap to Redux Toolkit 3.0, which includes both a large set of planned 2.x features and improvements, and planned 3.0 breaking changes.
- Deprecated
ApiRootStatereplaces RTK Query'sRootStatetype, which is now deprecated.RootStatewill be removed in 3.0. - Fixed
TypedAddListenerActionandTypedRemoveListenerActiondescribe the actions thataddListenerandremoveListeneractually dispatch. The default payload type ofTypedAddListenerandTypedRemoveListeneris now the listener options object, soaddListener.match(action)no longer claimsaction.payloadhas fields likeidandunsubscribethat don't exist at runtime. - Fixed
dispatch(removeListener(...))is typed as returningbooleananddispatch(clearAllListeners())as returningvoid, matching the runtime. - Fixed
UseQueryStateDefaultResultandUseInfiniteQueryStateDefaultResultare exported from@reduxjs/toolkit/query/react, for wrapping hooks with a genericselectFromResult.
- Breaking
- New
codegen: Migrate to oazapfts v7
- Fixed
combineSlices: Scope stateProxyMap per instance to prevent cross-instance proxy collisions
- Fixed
entityAdapter: pre-merge same-ID updates in sorted adapter's updateMany
- Fixed
entityAdapter:setAllwith duplicate IDs keeps last occurrence (consistent withsetMany)
- New
- Breaking
toolkit: Switch to native
NoInferutility type - New
Add TanStack Intent skills for Redux Toolkit
- Fixed
Allow interface-based type guards as listener matcher
- Fixed
Add setTimeout fallback to raf autoBatch strategy for background tabs
- Breaking
- Fixed
Use a normal Error when DOMException isn't available
- Fixed
2.11.1nothing new or fixed in the note
- New
Add refetchCachedPages option for infinite query
- Fixed
Compare paths against Regex instances in ignoredPaths
- New
- Fixed
Fix window SSR breakage
- Fixed
88 other lines we could not sort, mostly version bumps
- 2.15.0
Removing a cache entry while its request runs now aborts that request. This covers
removeQueryResult, a lazy query'sreset(), cache collection, andresetApiState. Theinitiate()promise resolves withisError: trueand anAbortErrorwhose message is'removed'or'reset'. That meansunwrap()now rejects in this case, where it used to resolve with stale or missing data. The plain promise still never rejects. - 2.15.0
queryFulfilledinonQueryStartedrejects in the same case. If youronQueryStarteddoesawait queryFulfilledwithout atry/catch, you'll now get an unhandled rejection when the entry is removed mid-request. Wrap it: - 2.15.0
Invalidating an entry that has a running request (by tags, or a focus/reconnect refetch) now waits for that request to finish. The running request's promise gets its own result, and then the entry refetches if it has subscribers, or is removed if it doesn't.
- 2.15.0
A refetch while a request is running joins that request instead of starting another one.
initiate()also joins a runningupsertQueryData. - 2.15.0
A
pendingentry restored from persisted state, with no request actually running, now fetches again. - 2.15.0
A negative numeric
pollingIntervalnow means "no polling". Before, it re-polled immediately in a loop. - 2.15.0
'payload.options.pollingInterval'is a new default entry in the serializability check'signoredActionPaths. If you pass your ownignoredActionPaths, you'll need to add it. - 2.15.0
SubscriptionOptions['pollingInterval']is nownumber | ((entry) => number), so code that reads it as anumberneeds a type check. There's a new exportedPollingIntervaltype. - 2.15.0
api.util.getMiddlewareState()is a thunk that returns read-only access to what the middleware tracks for that store (currentlygetSubscriptionCount(queryCacheKey)), orundefinedif the middleware isn't added (#5501). - 2.15.0
Query
initiate()results have anisSubscribed()method.
18 internal lines (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.