-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 V6 and simplify certain navigation utilities thanks to new API. #1758
Conversation
const navigation = useNavigation() | ||
const goBack = () => navigation.goBack() | ||
export const DemoListScreen: FC<StackScreenProps<NavigatorParamList, "demoList">> = observer( | ||
({ navigation }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've merged this, but just as a question, why switch to using props to grab the navigation reference rather than using the useNavigation
hook? I kinda prefer the hook from an aesthetic standpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jamonholmgren it's because I wasn't sure how to type the useNavigation
hook with the navigation route types. Maybe it takes a generic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! Good answer. Thanks.
# [7.2.0](v7.1.1...v7.2.0) (2021-08-10) ### Bug Fixes * **boilerplate:** Adds gradient background component, replacing Wallpaper ([#1759](#1759) by @JayPerfetto) ([2efdf7e](2efdf7e)) ### Features * **navigation:** Upgrade React Navigation to V6 ([#1758](#1758) by [@harrisrobin](https://github.com/harrisrobin)) ([5dd10ee](5dd10ee))
🎉 This PR is included in version 7.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Please verify the following:
yarn ci:test
jest tests pass with new tests, if relevantREADME.md
has been updated with your changes, if relevantDescribe your PR
✅ Upgrade React Navigation to the latest version
✅ several improvements to navigation-utilities based on new APIs
✅ use native-stack instead of the js-stack.