@reduxjs/toolkit
2.13.0 · 29 Sep 2026MIT45.8M / weekRepositoryHomepagenpmAtom feed
2.13.0 is the newest release of 2.x.
In short
2 new2 fixed3 changed
Release note
This bugfix release fixes a long-standing issue with RTK Query lazy query triggers returning stale data in some cases, fixes an error handling issue in RTK Query, and exports additional TS types.
Changelog
Lazy Query Trigger Handling
We'd had a couple long-standing issues reporting that const result = await someLazyQueryTrigger() sometimes returned stale data, especially if a mutation had just invalidated that query's tag.
We finally got a good repro of this issue and identified it as a mis-written call inside of the middleware that skipped past the necessary handling to activate the correct query status tracking in that scenario. This should now be fixed.
Other Changes
Timeout handling in RTKQ endpoints should now correctly throw a timeout-related error instead of an AbortError.
Base queries now have access to the current queryCacheKey value so it can be used in deciding query logic.
We've exported several more TS types related to query options, as some users have been depending on those even though they previously weren't part of the public API.
What's Changed
Export
QueryExtraOptionsandMutationExtraOptionsFix
mangleErrorsnot preserving different error typesAdd the
TypedUseQueryStateOptionshelper typebaseQuery: Expose queryCacheKey in baseQuery
Fix
AbortErrorbeing triggered incorrectly oncreateApiendpoint timeouttype: Export QueryReturnValue
Call
initiateto refetch queries from middleware