Packages

@reduxjs/toolkit

2.15.0 · 18 Nov 2026MIT51.3M / weekRepositoryHomepagenpmAtom feed

Upgrading @reduxjs/toolkit From 2.14.0 to 2.15.0

1 release in betweenevery note read

Reading releases, release notes and advisories…

  1. 2.14.0yours
  2. 2.15.0target
1
change to make
0
advisories fixed
0
new
3
fixes

Before you upgrade

Tick each one off as you go
  • Deprecated2.15.0

Release by release

  1. 2.15.0

    Deprecation18 Nov 20263 fixes
    • Deprecated

      The hooks use isSubscribed() now, and don't dispatch anything to check subscriptions. The internal_getRTKQSubscriptions action is deprecated. It still works in 2.x, but logs a one-time dev warning and will be removed in 3.0.

    • Fixed

      refetchOnMountOrArgChange: 0 and forceRefetch: 0 now always refetch. Before, 0 disabled the option.

    • Fixed

      refetchOnFocus and refetchOnReconnect refetch a shared query if any subscriber's own or inherited setting is true. One subscriber's false no 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.

10 other lines we could not sort, mostly version bumps
  • Removing a cache entry while its request runs now aborts that request. This covers removeQueryResult, a lazy query's reset(), cache collection, and resetApiState. The initiate() promise resolves with isError: true and an AbortError whose message is 'removed' or 'reset'. That means unwrap() now rejects in this case, where it used to resolve with stale or missing data. The plain promise still never rejects.

    2.15.0
  • queryFulfilled in onQueryStarted rejects in the same case. If your onQueryStarted does await queryFulfilled without a try/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 running upsertQueryData.

    2.15.0
  • A pending entry restored from persisted state, with no request actually running, now fetches again.

    2.15.0
  • A negative numeric pollingInterval now 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's ignoredActionPaths. If you pass your own ignoredActionPaths, you'll need to add it.

    2.15.0
  • SubscriptionOptions['pollingInterval'] is now number | ((entry) => number), so code that reads it as a number needs a type check. There's a new exported PollingInterval type.

    2.15.0
  • api.util.getMiddlewareState() is a thunk that returns read-only access to what the middleware tracks for that store (currently getSubscriptionCount(queryCacheKey)), or undefined if the middleware isn't added (#5501).

    2.15.0
  • Query initiate() results have an isSubscribed() method.

    2.15.0

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.