[go: up one dir, main page]

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

Upgrade React Navigation to V6 and simplify certain navigation utilities thanks to new API. #1758

Merged
merged 5 commits into from
Aug 10, 2021

Conversation

harrisrobin
Copy link
Collaborator
@harrisrobin harrisrobin commented Aug 7, 2021

Please verify the following:

  • yarn ci:test jest tests pass with new tests, if relevant
  • README.md has been updated with your changes, if relevant

Describe 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.

@jamonholmgren jamonholmgren merged commit 5dd10ee into infinitered:master Aug 10, 2021
const navigation = useNavigation()
const goBack = () => navigation.goBack()
export const DemoListScreen: FC<StackScreenProps<NavigatorParamList, "demoList">> = observer(
({ navigation }) => {
Copy link
Member

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.

Copy link
Collaborator Author
@harrisrobin harrisrobin Aug 10, 2021

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! Good answer. Thanks.

infinitered-circleci pushed a commit that referenced this pull request Aug 10, 2021
# [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))
@infinitered-circleci
Copy link

🎉 This PR is included in version 7.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants