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
Migrating to react-redux v7 #5588
Comments
Hi @vivek1729. This seems like a reasonable thing to do. I'm not sure how much updates need to be done when going from 6 to 7. |
@vivek1729 and others, Perhaps let's start a checklist of things that would need to be updated to go from v6 to 7. Breaking changes from v6 to 7 that impact nteract
|
Thanks for chiming in @willingc. The detailed release notes for v7 can be found here. This update would require bumping I scanned through this repo and it seems like the following packages have
For the |
I also spent some time attempting this upgrade on the nteract mono repo (draft PR) and the outputs repo (draft PR). In both the PRs, I have tried to detail the issues and learnings. In both these PRs, I managed to get the package built successfully and the nteract desktop app to load as well. However, looking at the changes detailed in the redux 7 roadmap, it'd be important to validate the integration of these different packages and think through these scenarios. |
Here are some of the added benefits to updating react-redux to v7 (from Barry's notes):
@captainsafia, @rgbkrk - here are some of the tasks I foresee for this update to happen if we decide to take a phased approach. Phase 1: Update react-redux to v7 in the outputs repo
Phase 2: Update react-redux to v7 in the mono repo
Phase 3: Adopt newer APIs from v7 as necessary.Clearly we'd also want to validate and test out these changes before the release (esp. in Phase 1 and Phase 2). You'd also want to think about how this should affects the package release versions (if this qualifies as a breaking change etc.) |
Communicate breaking change
|
Yipes, I'm amazed anyone is still using v6 this long after v7 came out! Please do migrate to v7 ASAP - it's vastly better than v6 was. There should be no meaningful changes API-wise, just bump the package version and make sure you're on React 16.8+ (which you should be anyway at this point). You should also know that we're currently working on React-Redux v8, which is aimed to come out alongside React 18 whenever that goes live (possibly early 2022?), and will have a hard dependency on React 18 the same way v7 depends on 16.8+: Note that we do also now recommend the use of the React-Redux hooks API as the default. Finally, note that we have an official Redux Toolkit package that is now the standard approach for writing Redux logic. If you aren't using yet, we strongly recommend switching to using RTK - it will simplify existing code, catch common mistakes, and includes APIs for a number of common Redux use cases. You can migrate incrementally - switch the store setup for RTK's |
Hello nteract,
I noticed that the mono repo relies on react-redux v6 which was released about 2 years ago. Redux 7 has been out for a bit and has seen good community adoption. Beyond stabilization, v7 also provides some performance improvements and new APIs. Most notably, they introduce a new
batch
api which could have a significant impact in reducing the number of state updates and render calls for React components.I wanted to jumpstart a discussion to talk through the challenges and better understand if this is something on the radar of the community
Thanks!
The text was updated successfully, but these errors were encountered: