React Native — Which Navigator should I use?
NavigationExperimental is no longer the preferred method of Navigation in React Native, and will soon be deprecated. I would suggest checking out React Navigation with is the current standard and my preferred method of navigation.On episode 40 of React Native Radio, Eric Vicenti of Facebook joined us to talk about React Native Navigation in general as well as the new Navigation API, Navigator Experimental, and how React Native is being used inside Facebook.
— — — -
One of the main questions I seem to get when people are looking to begin a React Native Project is what Navigator to use, so we passed this question to Eric and let him give us his take. Below is the transcription of the conversation we had about the subject:
I guess the big question I get from a lot of people is if they are starting a new project today, what navigator should they use?
If they want to go with a sort of modern redux app philosophy, where you keep all of your state for your whole application at the top level of your app inside of a store, and you just have views rendering for everything else, in that case you can just use Navigation Experimental as it is, it’s going to be pretty natural for you to use.
If you are interested in a more imperative approach, where you can sort of make method calls to navigate throughout your application in a way similar to the previous Navigator, then I would definitely recommend ExNavigation. We’re working relatively closely with Exponent so these things are not going to sort of diverge in dangerous ways.
Lastly, if you are really dead set on the React Router API, and that way of specifying your paths and components, in that tree of routes, then definitely take a look at React Router Native.
To hear the full discussion, check out episode 40 of React Native Radio.