DRAFT (Do not merge) Attempt redux7 update #5594
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To think through some of the challenges in upgrading
react-redux
to v7, I decided to scaffold a PR and see how far I get in this effort. Detailed info on the release notes and breaking changes for v7 can be found here. Since, v7 also requires a react update to atleast16.8
, I bumped up react/react-dom to latest 16.Associated package updates:
It's awesome that
react*
dependencies are listed as peer dependencies in individual packages which makes upgrades and management simpler. Following packages hadreact-redux
as a dependency (in theirpackage.json
):connected-components
myths
notebook-app-component
Beyond these packages, it is also mentioned as a dependency for 2 top level applications -
jupyter-extension
andweb
.Learnings
I wanted to focus my spike on getting the desktop app to load. I ran into the following Type annotation error that required a minor code change:
For some reason, I also consistently ran into the following error where the desktop app couldn't resolve these pcakges:
These 2 packages aren't listed as dependencies for the desktop app. As a temporary mitigation, I worked around it by just installing them at the top level.
With these changes I was able to get the desktop app to load and execute cells.
Future work
react-redux
update.I hope this serves as a good starting point for the effort.