To hide the tab bar in one of the screens, this works for React Navigation v4:
HomeStack.navigationOptions = ({ navigation }) => {
let tabBarVisible = true;
let routeName = navigation.state.routes[navigation.state.index].routeName
if ( routeName == 'ProductDetails' ) {
tabBarVisible = false
}
return {
tabBarVisible,
}
}
For v5, and v6 please check @Chathuranga Kasthuriarachchi’s answer here