I'm new to react-navigation and trying to wrap my head around how to do the following:
Given this navigation structure:
RootTabNavigator
LoggedOut_StackNavigator
...
LoggedIn_StackNavigator
LoggedIn_TabNavigator <-- TabBar rendered by this Navigator
TabA_StackNavigator
ScreenA
ScreenB
I would like to be able to navigate from ScreenA to ScreenB using the typical "slide in from right" transition, in such a way that the TabBar is visible on ScreenA, but is not visible on ScreenB. In other words, when I navigate to ScreenB, I want it to take up the entire window.
Once the user transitions from ScreenA to ScreenB, they can either press the back button to return back to ScreenA, or navigate to new routes using the same transition with the TabBar still not visible.
What I've tried:
navigationOptions.tabBarVisible: this property only seems to work when applied toTabA_StackNavigatoritself, which means that all of the screens in its stack also conceal theTabBar. Adding it to the screens inside the StackNavigator has no effect.Adding a new
AllScreens_StackNavigatoras a sibling ofLoggedIn_TabNavigatorand navigating to routes inside this navigator, I get the error:Expect nav state to have routes and index, {"routeName":"ScreenB", "params": {}, "key": "init-id-1516..."}. The navigation action I dispatched to try to do this:{ "action": Object { "params": Object {}, "routeName": "ScreenB", "type": "Navigation/NAVIGATE", }, "params": Object {}, "routeName": "AllScreens_StackNavigator", "type": "Navigation/NAVIGATE", }
Any help is greatly appreciated!