{"repo":"grahammendick/navigation","free":true,"listed":false,"github":"https://github.com/grahammendick/navigation","clone":"git clone https://github.com/grahammendick/navigation.git","description":"Scene-Based Navigation for React and React Native","language":"TypeScript","stars":660,"topics":["javascript","router","react","mobile","native"],"license":"Apache-2.0","category":"mobile-apps","readme_excerpt":"The Navigation router Scene-Based Navigation for React and React Native Scene-Based Navigation Native apps have always had scene-based navigation. The Navigation router is the first to bring it to the web. You give the Navigation router a list of your scenes. After you navigate to a scene, the Navigation router gets out of your way so you can build your UI however you want. React and React Native You don't need a different routing library for React and React Native anymore. The Navigation router works on both. What's more, it doesn't compromise the UX. On React Native, the navigation is 100% native on Android and iOS. On React, you can have whatever URLs you want. React npm install navigation navigation-react Define Your States You create one State for each scene (page) in your app. You don't need to define your routes yet. The Navigation router generates interim routes. You can define your real routes at any time without changing any code. With scene-based navigation, there aren't any hard-coded Urls for you to update. Create Your Scenes For each State , you create a SceneView component that renders the UI. All the other routers for React force you to think in terms of routes. But this is hard becasue routes can be nested, for example, a master/details page. Scenes, on the other hand, are always flat. The Navigation router still supports nested routes because a Scene can have more than one route. Navigate to a Scene The NavigationLink component changes scene. You pass the na","default_branch":null,"files":null,"tree":[],"storefront":"/r/grahammendick","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/grahammendick/navigation/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}