Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

chore(deps): bump @reduxjs/toolkit from 1.6.2 to 1.7.0 #2852

Merged
merged 1 commit into from
Dec 13, 2021

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 13, 2021

Bumps @reduxjs/toolkit from 1.6.2 to 1.7.0.

Release notes

Sourced from @​reduxjs/toolkit's releases.

v1.7.0

This feature release has a wide variety of API improvements:

  • updates RTK Query with support for SSR and rehydration
  • allows sharing mutation results across components
  • adds a new currentData field to query results
  • adds several new options for customizing endpoints and base queries
  • adds support for async condition options in createAsyncThunk
  • updates createSlice/createReducer to accept a "lazy state initializer" function
  • updates createSlice to avoid potential circular dependency issues by lazy-building its reducer
  • updates Reselect and Redux-Thunk to the latest versions with much-improved TS support and new selector customization options
  • Fixes a number of small code and types issues
npm i @reduxjs/toolkit@latest
yarn add @​reduxjs/toolkit@​latest

Changelog

RTK Query

RTK Query SSR and Rehydration Support

RTK Query now has support for SSR scenarios, such as the getStaticProps/getServerSideProps APIs in Next.js. Queries can be executed on the server using the existing dispatch(someEndpoint.initiate()) thunks, and then collected using the new await Promise.all(api.getRunningOperationPromises()) method.

API definitions can then provide an extractRehydrationInfo method that looks for a specific action type containing the fetched data, and return the data to initialize the API cache section of the store state.

The related api.util.getRunningOperationPromise() API adds a building block that may enable future support for React Suspense as well, and we'd encourage users to experiment with this idea.

Sharing Mutation Results Across Components

Mutation hooks provide status of in-progress requests, but as originally designed that information was unique per-component - there was no way for another component to see that request status data. But, we had several requests to enable this use case.

useMutation hooks now support a fixedCacheKey option that will store the result status in a common location, so multiple components can read the request status if needed.

This does mean that the data cannot easily be cleaned up automatically, so the mutation status object now includes a reset() function that can be used to clear that data.

Data Loading Updates

Query results now include a currentData field, which contains the latest data cached from the server for the current query arg. Additionally, transformResponse now receives the query arg as a parameter. These can be used to add additional derivation logic in cases when a hooks query arg has changed to represent a different value and the existing data no longer conceptually makes sense to keep displaying.

Data Serialization and Base Query Improvements

RTK Query originally only did shallow checks for query arg fields to determine if values had changed. This caused issues with infinite loops depending on user input.

... (truncated)

Commits
  • ad12875 v1.7.0
  • 7a1fec4 Fix lockfile issues
  • db0d7dc Merge pull request #1565 from reduxjs/v1.7.0-integration
  • aad6d32 Merge branch 'master' into v1.7.0-integration
  • 29d6f6d Use originalArgs in transformResponse (#1819)
  • 0c3c41d Merge pull request #1818 from reduxjs/bugfix/1817-rtkq-selectors
  • 17f033e Bump TS matrix to include 4.4 and 4.5 on this branch
  • 521bcc3 Fix a bug in optimisticUpdates.test and silence some warnings
  • 604577b Fix a bug in the RTKQ selector typings causing bad state args
  • 4bb0c5c Override unwrap behavior for buildInitiateQuery, update tests (#1786)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@reduxjs/toolkit](https://github.com/reduxjs/redux-toolkit) from 1.6.2 to 1.7.0.
- [Release notes](https://github.com/reduxjs/redux-toolkit/releases)
- [Commits](reduxjs/redux-toolkit@v1.6.2...v1.7.0)

---
updated-dependencies:
- dependency-name: "@reduxjs/toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Dec 13, 2021
Copy link

@autoapproval autoapproval bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved 👍

@vercel
Copy link

vercel bot commented Dec 13, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/hospitalrun/hospitalrun-frontend/634AizT9Dz7Uyr3UQwQF7SJYMxpN
✅ Preview: https://hospitalrun-frontend-git-dependabot-npmandya-a3a142-hospitalrun.vercel.app

@matteovivona matteovivona merged commit 65767d7 into master Dec 13, 2021
@matteovivona matteovivona deleted the dependabot/npm_and_yarn/reduxjs/toolkit-1.7.0 branch December 13, 2021 08:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autoapproved dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant