-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Introduce navigators in the tutorial #8515
Conversation
Next up: - Include images that describe navigation stacks - Expand navigation guide to document nav bars - Add iOS vs Android considerations (animation direction, nav bars)
Mobile apps rarely consist of just one scene (another word for screen). As soon as you add a second scene to your app, you will have to take into consideration how the user will navigate from one scene to the other. | ||
|
||
You can use navigators to transition between multiple scenes. These transitions can be typical side-to-side animations down a master/detail stack, or vertical modal popups. | ||
This guide covers the various navigation components available in React Native. If you are just getting started with navigation, I recommend you check out the |
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.
this sentence is missing the
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.
Oops, I meant to that sentence.
Just some nit picking, overall this looks really good! |
} | ||
``` | ||
|
||
Something you will encounter a lot when dealing with navigation is the concept of routes. A route is an object that contains information about a scene. It is used to provide all the context that the navigator's `renderScene` function needs to render a scene. In the example above, we can distinguish between different scenes through the `title` key in the route. |
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.
Minor, but it may be worth mention that you can use any key to distinguish your scene. In your case you just happened to pick "title"
Great intro. |
@facebook-github-bot shipit |
Thanks for importing. If you are an FB employee go to Phabricator to review. |
7d3fbbd
* Introduce navigators in the tutorial Summary: Adds a new section to the tutorial. Covers the basics of scenes and navigators. The navigator comparison doc has been moved to docs/navigation.html in this PR. ![navigators](https://cloud.githubusercontent.com/assets/165856/16505919/37459e3a-3ed4-11e6-87e9-5fa7e6f792d3.png) Closes #8515 Differential Revision: D3507325 Pulled By: caabernathy fbshipit-source-id: e9ee5b2572868189af198cdf461b2728dfa84f9e * Fix links from networking to navigation in The Basics. Summary: Fixes #8611. Once this lands, we may want to cherry-pick it into 0.29 to fix the broken links. Closes #8698 Differential Revision: D3544388 Pulled By: JoelMarcey fbshipit-source-id: d5132b112e3079d1fd9ab6d84ff1a4328bee871f
Summary: Adds a new section to the tutorial. Covers the basics of scenes and navigators. The navigator comparison doc has been moved to docs/navigation.html in this PR. ![navigators](https://cloud.githubusercontent.com/assets/165856/16505919/37459e3a-3ed4-11e6-87e9-5fa7e6f792d3.png) Closes facebook#8515 Differential Revision: D3507325 Pulled By: caabernathy fbshipit-source-id: e9ee5b2572868189af198cdf461b2728dfa84f9e
Summary: Adds a new section to the tutorial. Covers the basics of scenes and navigators. The navigator comparison doc has been moved to docs/navigation.html in this PR. ![navigators](https://cloud.githubusercontent.com/assets/165856/16505919/37459e3a-3ed4-11e6-87e9-5fa7e6f792d3.png) Closes facebook#8515 Differential Revision: D3507325 Pulled By: caabernathy fbshipit-source-id: e9ee5b2572868189af198cdf461b2728dfa84f9e
Adds a new section to the tutorial. Covers the basics of scenes and navigators.
The navigator comparison doc has been moved to docs/navigation.html in this PR.