Skip to content

Update NavigationService example for v3 #317

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

Merged
merged 1 commit into from
Dec 6, 2018

Conversation

brettdh
Copy link
Contributor

@brettdh brettdh commented Dec 4, 2018

I am trying to follow these two doc pages in conjunction:

Though the "Navigating without the navigation prop" seems out of date since the introduction of explicit app containers in v3, the App Containers page indicates that I can get a ref on the container that functions just like a navigator. After a couple of false starts, I stumbled upon what seems to be the correct setup, but it would have been helpful to start from a working example without having to infer the correct combination.

My minimal working example:

https://snack.expo.io/@brettdh/navigationservice-and-createappcontainer

Possibly related: react-navigation/react-navigation#5252

Make sure to add your changes to versioned docs

Thanks for opening a PR!

The docs cover several versions of react-navigation, and in some cases there are several files (for version 1, version 2 and etc.) that all describe single page of the docs (eg. "Getting Started").

Please make sure that the edit you're making in docs/file-you-edited.md is also included in the file for the correct version, eg. website/versioned_docs/version-3.x/file-you-edited.md for version 3. 👍

I didn't see a website/versioned_docs/version-3.x/navigating-without-navigation-prop.md file, and I'm not sure if I should be creating one there; please let me know what's correct. Thanks!

@react-navigation-bot
Copy link

react-navigation-bot commented Dec 4, 2018

Deploy preview for react-navigation ready!

Built with commit d9c0b50

https://deploy-preview-317--react-navigation.netlify.com

@brettdh
Copy link
Contributor Author

brettdh commented Dec 4, 2018

Looks like the answer's yes, seeing as the 3.x docs in the deploy preview don't have my changes. Updating shortly. :)

I am trying to follow these two doc pages in conjunction:

- https://reactnavigation.org/docs/en/app-containers.html
- https://reactnavigation.org/docs/en/navigating-without-navigation-prop.html

Though the "Navigating without the navigation prop" seems out of date since the introduction of explicit app containers in v3, the **App Containers** page indicates that I can get a ref on the _container_ that functions just like a navigator. After a couple of false starts, I stumbled upon what seems to be the correct setup, but it would have been helpful to start from a working example without having to infer the correct combination.

My minimal working example:

https://snack.expo.io/@brettdh/navigationservice-and-createappcontainer

Possibly related: react-navigation/react-navigation#5252
@vonovak vonovak merged commit ca0da5a into react-navigation:source Dec 6, 2018
@brettdh brettdh deleted the patch-1 branch December 6, 2018 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants