-
-
Notifications
You must be signed in to change notification settings - Fork 654
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
Upgrade react-navigation to v2 #3573
Comments
To try to clear the ground for this, I just went and made a fresh reading of the v2 release notes. Two things stand out as affecting us:
Things I think don't affect us:
"Enhancements" that look relevant:
|
OK, I have a draft branch for the v2 upgrade: Passes To make the branch I went through making an upgrade from scratch; then I consulted #2702 to compare notes. Differences from #2702 include:
(that output is from Jest tests, in running Looking back at #2702, it didn't pull in
|
Answer to this (from a simulated iPhone X with iOS 12.4) turns out to be:
|
Part of #3573. This upgrades to v2; v3 will come after. Followed the standard playbook for upgrading a dependency: * Upgrade with `yarn upgrade`. * Update libdefs with `yarn update-libdefs`. * Read upstream release notes, test things, and make changes as needed. So, first: $ yarn upgrade --latest \ react-navigation@^2 react-navigation-redux-helpers@^2 $ yarn upgrade --latest \ react-navigation@^2.18.3 react-navigation-redux-helpers@^2.0.9 $ yarn update-libdefs Then, upstream release notes here: https://reactnavigation.org/blog/2018/05/07/react-navigation-2.0.html My detailed notes on it are in #3573. Updates required were: * Switch from `NavigationActions.navigate` to `StackActions.push`, to keep the existing behavior. (And `NavigationActions.pop` to `StackActions.pop`.) This is the changes in `AppWithNavigation.js` and a test. * Several names are deprecated. They cause warnings but no errors or breakage; so to keep this commit small, I'll be taking care of those in followup commits. * The Redux integration's API got simplified, in a breaking change. This wasn't even mentioned in the release notes. The new version's docs on the Redux integration include a rather belated deprecation warning. For fixing the Redux integration, I compared the new and old docs: https://reactnavigation.org/docs/en/2.x/redux-integration.html https://reactnavigation.org/docs/en/1.x/redux-integration.html and followed the changes. One change between the examples is omitted here: the use of `createNavigationReducer`. Docs say that one's optional: https://github.com/react-navigation/redux-helpers/tree/2.0.9#api and in particular basically a convenience helper for doing trivial cases of what we already do with our `nav` reducer.
EDIT: This issue is for just the v2 upgrade; the v3 upgrade is now #3649. Original description was for both v2 and v3, below.
We use
react-navigation
for navigation in the app. We're on version 1.6.1. There has been a lot of development since then, with two new major versions: 2 and 3.The newer releases contain various bugfixes, as well as compatibility with newer other software. Issues blocked on this upgrade include #3066, #3566, #3569; also possibly #2716 and #3370; and PRs #2831 and #3067.
There's partial work toward a v2 upgrade in #2702, and toward v3 in #3502. Filing this issue partly so I have an actual issue to link to rather than saying "the thing that #2702 and #3502 are intended to do" 😉 .
Priority because blocking #3066 which is P1.
The text was updated successfully, but these errors were encountered: