Hello, I used expo with default tab navigation and I understand how can I add more screens in bottom tab navigation. The thing I don’t understand is how can I navigate to a screen that isn’t in tab navigation?
You’ll need to have more than one navigator, with one nested in the other. I typically have a top (or at least a higher level) StackNavigator, then the TabNavigator is the default route within the StackNavigator. So, the tabs show up first, but then I can push another screen entirely over the tabs via the StackNavigator.
While not made expressly for this purpose, here is an example I’ve used in a presentation that has several layers of navigation: https://snack.expo.io/@llamaluvr/codemash-2019-example. You can follow through and find a top level SwitchNavigator for swapping between logged in/ logged out states, then a StackNavigator that defaults to tabs, and a child screen that gets pushed over the tabs. This is close to the kind of navigation I typically have in a full-featured app. The one difference is that my actual apps also add another StackNavigator for employing this pattern (https://reactnavigation.org/docs/en/modal.html) for displaying modals.
Thank you so much, your answer really helped me
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.