Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency react-redux to v8.1.0 #298

Merged
merged 1 commit into from
Jun 13, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 13, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react-redux 8.0.5 -> 8.1.0 age adoption passing confidence

Release Notes

reduxjs/react-redux

v8.1.0

Compare Source

This feature release adds new development-mode safety checks for common errors (like poorly-written selectors), adds a workaround to fix crash errors when React-Redux hooks are imported into React Server Component files, and updates our hooks API docs page with improved explanations and updated links.

Changelog

Development Mode Checks for useSelector

We've had a number of users tell us over time that it's common to accidentally write selectors that have bad behavior and cause performance issues. The most common causes of this are either selectors that unconditionally return a new reference (such as state => state.todos.map() without any memoization ), or selectors that actually return the entire root state ( state => state ).

We've updated useSelector to add safety checks in development mode that warn if these incorrect behaviors are detected:

  • Selectors will be called twice with the same inputs, and useSelector will warn if the results are different references
  • useSelector will warn if the selector result is actually the entire root state

By default, these checks only run once the first time useSelector is called. This should provide a good balance between detecting possible issues, and keeping development mode execution performant without adding many unnecessary extra selector calls.

If you want, you can configure this behavior globally by passing the enum flags directly to <Provider>, or on a per-useSelector basis by passing an options object as the second argument:

// Example: globally configure the root state "noop" check to run every time
<Provider store={store} noopCheck="always">
  {children}
</Provider>
// Example: configure `useSelector` to specifically run the reference checks differently:
function Component() {
  // Disable check entirely for this selector
  const count = useSelector(selectCount, { stabilityCheck: 'never' })
  // run once (default)
  const user = useSelector(selectUser, { stabilityCheck: 'once' })
  // ...
}

This goes along with the similar safety checks we've added to Reselect v5 alpha as well.

Context Changes

We're still trying to work out how to properly use Redux and React Server Components together. One possibility is using RTK Query's createApi to define data fetching endpoints, and using the generated thunks to fetch data in RSCs, but it's still an open question.

However, users have reported that merely importing any React-Redux API in an RSC file causes a crash, because React.createContext is not defined in RSC files. RTKQ's React-specific createApi entry point imports React-Redux, so it's been unusable in RSCs.

This release adds a workaround to fix that issue, by using a proxy wrapper around our singleton ReactReduxContext instance and lazily creating that instance on demand. In testing, this appears to both continue to work in all unit tests, and fixes the import error in an RSC environment. We'd appreciate further feedback in case this change does cause any issues for anyone!

We've also tweaked the internals of the hooks to do checks for correct <Provider> usage when using a custom context, same as the default context checks.

Docs Updates

We've cleaned up some of the Hooks API reference page, and updated links to the React docs.

What's Changed

Full Changelog: reduxjs/react-redux@v8.0.7...v8.1.0

v8.0.7

Compare Source

This release updates the peer dependencies to accept Redux Toolkit, and accept the ongoing RTK and Redux core betas as valid peer deps.

Note: These changes were initially in 8.0.6, but that had a typo in the peer deps that broke installation. Sorry!

What's Changed

Full Changelog: reduxjs/react-redux@v8.0.5...v8.0.7

v8.0.6

Compare Source

~~This release updates the peer dependencies to accept Redux Toolkit, and accept the ongoing RTK and Redux core betas as valid peer deps.~~

This release has a peer deps typo that breaks installation - please use 8.0.7 instead !

What's Changed

Full Changelog: reduxjs/react-redux@v8.0.5...v8.0.6


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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner June 13, 2023 16:16
@renovate renovate bot temporarily deployed to staging June 13, 2023 16:16 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:16 Inactive
@renovate renovate bot temporarily deployed to staging June 13, 2023 16:17 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:19 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:19 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:19 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:19 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:19 Inactive
@fkoulen fkoulen enabled auto-merge June 13, 2023 16:20
@cypress
Copy link

cypress bot commented Jun 13, 2023

Passing run #163 ↗︎

0 116 0 0 Flakiness 0

Details:

Update dependency react-redux to v8.1.0
Project: The Rhapsodies Commit: 440ca0f51c
Status: Passed Duration: 01:58 💡
Started: Jun 13, 2023 4:59 PM Ended: Jun 13, 2023 5:01 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@renovate renovate bot force-pushed the renovate/react-redux-8.x-lockfile branch from 17aeaf7 to cb4fd46 Compare June 13, 2023 16:32
@renovate renovate bot temporarily deployed to staging June 13, 2023 16:32 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:32 Inactive
@renovate renovate bot temporarily deployed to staging June 13, 2023 16:32 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:34 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:34 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:34 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:34 Inactive
@renovate renovate bot force-pushed the renovate/react-redux-8.x-lockfile branch from cb4fd46 to cd8dadb Compare June 13, 2023 16:40
@renovate renovate bot temporarily deployed to staging June 13, 2023 16:40 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:40 Inactive
@renovate renovate bot temporarily deployed to staging June 13, 2023 16:40 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:42 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:42 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:42 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:42 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:42 Inactive
@renovate renovate bot force-pushed the renovate/react-redux-8.x-lockfile branch from cd8dadb to 440ca0f Compare June 13, 2023 16:52
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:52 Inactive
@fkoulen fkoulen disabled auto-merge June 13, 2023 16:52
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:55 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:55 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:55 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:55 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 16:55 Inactive
@renovate renovate bot force-pushed the renovate/react-redux-8.x-lockfile branch from 440ca0f to fb22bcf Compare June 13, 2023 17:03
@renovate renovate bot temporarily deployed to staging June 13, 2023 17:03 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 17:03 Inactive
@renovate renovate bot temporarily deployed to staging June 13, 2023 17:04 Inactive
@fkoulen fkoulen enabled auto-merge June 13, 2023 17:04
@renovate renovate bot temporarily deployed to dev June 13, 2023 17:06 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 17:06 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 17:06 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 17:06 Inactive
@renovate renovate bot temporarily deployed to dev June 13, 2023 17:06 Inactive
@github-actions
Copy link

Preview can be found at https://the-rhapsodies-91mbx0yf3-the-rhapsodies.vercel.app

@sonarcloud
Copy link

sonarcloud bot commented Jun 13, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@fkoulen fkoulen merged commit 9fe40ca into dev Jun 13, 2023
@fkoulen fkoulen deleted the renovate/react-redux-8.x-lockfile branch June 13, 2023 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant