Route to the same screen from multiple tabs
complete
Robin
Say I have a standard tab navigation and all the tab screens can navigate into a ProfileScreen. How should I declare this ProfileScreen in the route? Should I declare a duplicate route under each tab referencing the same screen, or should I nest it in a parent stack navigation?
If I nest the TabNavigation in a StackNavigation, all the tabs can navigate to the ProfileScreen, but the tab navigation goes away from the screen - and I'd like to keep that tab navigation on screen.
If I nest a ProfileScreen inside a StackNavigation in each Tab, then I get strange behavior if I name the routenames the same in each tab, otherwise I'll have to name the routes with similar names like HomeProfileScreen, PhotosProfileScreen, etc... It's a bit fragile as any universal component that appears under multiple tabs will have a messy time figuring out which copy of the route to navigate to.
Brent Vatne
complete
Brent Vatne
in 2.0 you should be able to use the same route name in each tab as you described and navigate to them without any problem. please create a new issue on the react-navigation repo if you have a problem with it and follow the template, including a repro case :)
Robin
Brent Vatne: Works as expected.
PiyaleeMaiti12
Brent Vatne: Is there any solution for react-navigation 1.0?
Tauan Binato Flores
Brent Vatne: is it still possible in v5 ?
Brent Vatne
Tauan Binato Flores: yep. please follow up on react-navigation repo if you are having problems
Tauan Binato Flores
Brent Vatne: thanks for the reply, i was following this issue and get here : https://github.com/react-navigation/react-navigation/issues/3790.. i probably need custom routes for achieving that right?
Robin
posted description from github issue.