Bump @reduxjs/toolkit from 2.2.3 to 2.2.4
Bumps @reduxjs/toolkit from 2.2.3 to 2.2.4.
Release notes
Sourced from @reduxjs/toolkit
's releases.
v2.2.4
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
- Update remaining
Context
references to match the new nullableContext
by@aryaemami59
in reduxjs/redux-toolkit#4336- types: export
GetThunkAPI
type by@shrouxm
in reduxjs/redux-toolkit#4289- Inline the deprecated
React.ReactChild
type by@aryaemami59
in reduxjs/redux-toolkit#4382- Replace usage of deprecated
JSX
global namespace withReact.JSX
by@aryaemami59
in reduxjs/redux-toolkit#4381- Fix
useRef
usages to be called with an explicit argument ofundefined
. by@aryaemami59
in reduxjs/redux-toolkit#4380- Bump
reselect
dependency to 5.1.0 to resolve #4200 by@aryaemami59
in reduxjs/redux-toolkit#4400- Improve sorted entity adapter sorting performance by
@markerikson
in reduxjs/redux-toolkit#4361- Prevent inference of any in create.asyncThunk by
@EskiMojo14
in reduxjs/redux-toolkit#4389- try out simplifying matcher code by
@EskiMojo14
in reduxjs/redux-toolkit#4386- Handle bigint in useQuerySubscription by
@rkofman
in reduxjs/redux-toolkit#4315- fix: ensure hook subscription failures do not reset isLoading state by
@smacpherson64
in reduxjs/redux-toolkit#4364- Improve usability of the
initiate()
action for mutations. by@jared-ca
in reduxjs/redux-toolkit#4337- Make retryCondition receive unknown error, as the user may not be using fetchBaseQuery by
@EskiMojo14
in reduxjs/redux-toolkit#3957
... (truncated)
Commits
-
0246f78
Release 2.2.4 -
72b3ac6
Merge pull request #3957 from reduxjs/retry-error-type -
c892abd
Merge pull request #4337 from jared-ca/undefined-type-initiate-mutation -
5d77624
Merge pull request #4364 from smacpherson64/master -
5ec40d8
Merge pull request #4315 from rkofman/master -
3e021de
Merge pull request #4386 from reduxjs/matcher-golf -
f17e122
Merge pull request #4389 from reduxjs/infer-void-async-thunk -
13ae28b
Merge pull request #4255 from aryaemami59/update-ts-to-5.4 -
2283987
Merge pull request #4310 from aryaemami59/cut-down-on-resolutions -
99c4c3e
Merge pull request #4328 from aryaemami59/remove-rtk-github-issues-example-sa... - Additional commits viewable in compare view
Dependabot commands
You can trigger Dependabot actions by commenting on this MR
-
$dependabot recreate
will recreate this MR rewriting all the manual changes and resolving conflicts