Update dependency @reduxjs/toolkit to v2.2.4 #372
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "renovate/all"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
2.2.3
->2.2.4
Release Notes
reduxjs/redux-toolkit
v2.2.4
Compare Source
This bugfix release improves sorting performance in
createEntityAdapter
, shrinks the code size in matcher utilities, fixes assorted issues with query hooks, and makes several TS tweaks.Changelog
Entity Adapter Sorting Performance
Users reported in #4252 that the sorting performance of
createEntityAdapter
seemed abnormally bad - the provided comparison functions were being called far more times than expected.Upon investigation, we had a couple of problems. We were always starting from an array that was in insertion order, not the existing sorted order, and that would always require significant effort to re-sort even if there weren't any actual changes to the sorted results. Also, the sorting checks required frequent access to Immer's Proxy-wrapped values, even in cases where all we needed was the plain state values for comparison purposes.
We've reworked the internal sorting logic to always start from the existing sorted array, do reads against a plain value to avoid the Proxy getter overhead where possible, and optimized inserts into existing sorted arrays. This should significantly speed up sorted entity adapter behavior.
Matcher Code Size Optimization
We've reworked the internals of the thunk-related matchers to deduplicate some of the logic, shaving a few bytes off the final bundle size.
RTK Query Hook Updates
defaultSerializeQueryArgs
can now handleBigInt
values safely.The
isLoading
flag logic was improved to handle errors when a query hook tries to subscribe.TS Updates
create.asyncThunk
's types were improved to avoid cases where it might inferany
.We've made several internal types changes to work correctly with React 19's upcoming types.
The
retryCondition
method now receivesunknown
as an argument, instead of always assuming the user is usingfetchBaseQuery
.Other Changes
The Reselect dep has been bumped to 5.1.0 to match the expected internal usage of
createSelector.withTypes()
.What's Changed
Context
references to match the new nullableContext
by @aryaemami59 in https://github.com/reduxjs/redux-toolkit/pull/4336GetThunkAPI
type by @shrouxm in https://github.com/reduxjs/redux-toolkit/pull/4289React.ReactChild
type by @aryaemami59 in https://github.com/reduxjs/redux-toolkit/pull/4382JSX
global namespace withReact.JSX
by @aryaemami59 in https://github.com/reduxjs/redux-toolkit/pull/4381useRef
usages to be called with an explicit argument ofundefined
. by @aryaemami59 in https://github.com/reduxjs/redux-toolkit/pull/4380reselect
dependency to 5.1.0 to resolve #4200 by @aryaemami59 in https://github.com/reduxjs/redux-toolkit/pull/4400initiate()
action for mutations. by @jared-ca in https://github.com/reduxjs/redux-toolkit/pull/4337Full Changelog: https://github.com/reduxjs/redux-toolkit/compare/v2.2.3...v2.2.4
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.