when I hide the tabbar using tabBarVisible in a specific screen the upper half of the button in the middle will be still visible (above the red line), any ideas how I can hide that also?
I'm using react-navigation v5
const StackNav = (props: any) => {
React.useLayoutEffect(() => {
routes.includes(name)
? navigation.setOptions({tabBarVisible: false;})
: navigation.setOptions({tabBarVisible: true;})
}, [navigation, route]);
return (
<Stack.Navigator>
<Stack.Screen name="home" component={HomeScreen} />
<Stack.Screen name="food" component={FoodScreen} />
<Stack.Screen name="review" component={ReviewScreen} />
</Stack.Navigator>
);
};
so the BottomTab navigation wraps the StackNav that holds all the screens of the App
const BottomTab = () => {
const Tab = createBottomTabNavigator();
return (
<Tab.Navigator
screenOptions={({route}) => ({
tabBarIcon: ({focused}) => {
return <Tab focused={focused} />;
},
})}
>
<Tab.Screen name="profile" component={StackNav} />
<Tab.Screen name="story" component={StackNav} />
</Tab.Navigator>
);
};