Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React native routing vs React navigation [closed]

I'm about to choose whether to use React Navigation or to use React Router Native, I thought that React Navigation is better, but then I found some feedbacks like this react navigation issue, ps: React Router Native has similar API to React Router which seems very simple, I'm still lost! I need an advice

like image 839
challenger Avatar asked Oct 10 '17 09:10

challenger


People also ask

Which is better react navigation or React Native navigation?

Integration with existing apps In such a case, any navigator based on JS works well compared to existing native solutions. This gives React Navigation the edge over RNN, especially if you are looking to power a few modules of your existing app with React Native, just like Facebook and many other brownfield apps do.

What is route and navigation in React Native?

React Navigation is a popular library for routing and navigation in a React Native application. This library helps solve the problem of navigating between multiple screens and sharing data between them.

What is the difference between react navigation stack and react navigation stack?

A key difference between how this works in a web browser and in React Navigation is that React Navigation's native stack navigator provides the gestures and animations that you would expect on Android and iOS when navigating between routes in the stack.


1 Answers

In my experience React Navigation works like a charm. It uses native-alike layouts if you don't wanna create your own, and let you customize them via props as you wish. It also lets you navigate inside functions without the need of redux actions, which i think are a must in React Router.
The main problem of React Navigation is its documentation, which is pretty lackluster. It has no complex examples, only simple stuff, so you have to lurk a little bit to do some stuff if your app starts getting complex, with a lot of nests.
Even so, the only hard to solve problem i really had with React Navigation was when i had a Stack Navigator (2nd) inside a Drawer Navigator which was nested inside a main Stack Navigator (1st), which back then wouldn't let me change the main header from within the 2nd Stack Navigator. This could be worked around by putting the 2nd Stack Navigator directly inside the main one.

like image 154
Guilherme Cronemberger Avatar answered Sep 28 '22 08:09

Guilherme Cronemberger