One way to make the tab bar go away is to hide the tabBar with visible: false :
const MyApp = TabNavigator({ Home: { screen: MyHomeScreen, }, TakePhoto: { screen: PhotoPickerScreen, navigationOptions: { tabBar: { visible: false, }, }, }, });
However, it does not seem to cause any transition to full-screen mode, which I assume is desirable?
Another option would be to wrap PhotoPickerScreen inside the new StackNavigator and set this navigator to = 'modal' mode.
You may need to start navigating this modal from onPress to tabItem in some way (e.g. navigation.navigate('TakePhoto') .)
Notice I'm trying to wrap my head around the best way to structure navigation, so ...
The third option, implementing StackNavigator as the parent, and then adding MyApp TabNavigator as the first route inside it, might be the most flexible solution. Then the TakePhoto screen will be at the same level as the TabNavigator, allowing you to route it to wherever you are.
Hear what you come up with!
source share