Skip to content

Bump @reduxjs/toolkit from 1.9.2 to 1.9.3

Dependabot requested to merge dependabot-npm_and_yarn-reduxjs-toolkit-1.9.3 into master

Bumps @reduxjs/toolkit from 1.9.2 to 1.9.3.

Release notes

Sourced from @​reduxjs/toolkit's releases.

v1.9.3

This release fixes a couple issues with the skip/skipToken options for query hooks, and makes a small perf tweak to serializing query args.

Changelog

Skip Behavior

We made a change in v1.9.0 that tried to make some skip behavior more consistent, including clearing out the cached data. However, we had overlooked that our own docs actually said "skipping a query will keep the cached data", and several users pointed this out as they'd been relying on that behavior.

We've reverted that change. Now, setting {skip: true} or skipToken for a query with existing results will keep the data value (reflecting the last successful query), but currentData will be undefined (reflecting the current settings).

We also identified and fixed an issue that could cause subscription entries to leak under a specific combination of timing and settings changes.

Query Arg Serialization Perf

RTKQ relies on serializing query arguments to serve as the cache keys, with the default using JSON.stringify() + some logic for sorting keys. There was a report that in some apps, large query arg objects could take a while to stringify and this was being done repeatedly. We've added a WeakMap-based cache for query args to avoid re-serializing existing arg values.

What's Changed

Full Changelog: https://github.com/reduxjs/redux-toolkit/compare/v1.9.2...v1.9.3

Commits
  • a636751 Release 1.9.3
  • 71c3c8c Merge pull request #3193 from reduxjs/bugfix/3147-query-args-perf
  • 04f4131 Use a WeakMap cache for query arg serialization for perf
  • 4fba13e Merge pull request #3188 from reduxjs/bugfix/2871-skip-data
  • 364ff51 Only remove promise in query hook if the subscription was removed
  • 140ca1a Revert "clear data on skip" back to its original behavior
  • 43d94a0 Merge pull request #3158 from petermekhaeil/master
  • d53eea2 docs: Add missing keys to BaseQueryApi
  • bdf8af3 Merge pull request #3135 from vvcigy/patch-1
  • 9917fdf Fix original and current examples
  • See full diff in compare view


Dependabot commands
You can trigger Dependabot actions by commenting on this MR
  • $dependabot rebase will rebase this MR
  • $dependabot recreate will recreate this MR rewriting all the manual changes and resolving conflicts

Merge request reports