I use a bottom tabs navigator imported from 'react-navigation-tabs'
import { createBottomTabNavigator } from 'react-navigation-tabs';
const AppNavigator = createBottomTabNavigator({
Homepage: {
screen: Screen1
},
Screen2: {
screen: Screen2
}
} , {
initialRouteName:"Screen1"
});
Screen 1 is a stack navigator
const AppNavigator = createStackNavigator({
Homepage: {
screen: Screen1,
},
Screen2: {
screen: Screen2
}
} , {
initialRouteName : "Homepage",
headerMode:"none",
navigationOptions: ({ navigation }) => ({
tabBarVisible: navigation.state.routes[navigation.state.index].routeName === 'Screen2' ? false : true
})
});
After some researches , I found the below solution , but not works
navigationOptions: ({ navigation }) => ({
tabBarVisible: navigation.state.routes[navigation.state.index].routeName === 'Screen2' ? false : true
})
It's a bad news because even to hide it from all screens , the below code also did not work
navigationOptions: ({ navigation }) => ({
tabBarVisible: false
})
the tabs always visible , after much researches and trying tens of solutions