Route to the same screen from multiple tabs
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.
marked this post as