0

I am using react-router-native for routing. Usually when ever new route is pushed to history the current screen will be unmounted and new screen is mounted. But As per documentation nested routing is possible in web. They haven't mentioned anything about mobile.

I just want to know if nested routing is possible react-native as I want two routes to be active at a time.

Thank You.

ThinkAndCode
  • 1,319
  • 3
  • 29
  • 60
  • Refer this https://tylermcginnis.com/react-router-nested-routes/ – Akila Devinda Feb 21 '20 at 05:18
  • @AkilaDevindaI had already gone through this which talks about web. But I would like to know the possibility in react-native. Any other alternative is appreciated. Thank You. – ThinkAndCode Feb 21 '20 at 05:39

1 Answers1

1

in case of React Native use React navigation https://reactnavigation.org/ and its stack routing in case of mobile development where you mount a new view by navigate() and unmount by goback() to history ref - https://reactnavigation.org/docs/en/stack-navigator.html

Parvej Mallick
  • 467
  • 1
  • 7
  • 11
  • seems nested routing is possible with this package. But we have already implemented `react-router-native` in our package and not sure we can revert from it. So at least I would like to know if it is possible with `react-router-native`. Are you experienced with `react-router-native`? – ThinkAndCode Feb 21 '20 at 06:31
  • Yes but react-router for web not in React Native :( but react-router-native-stack might help you out – Parvej Mallick Feb 21 '20 at 07:03