I have app.js in which:
const Tab = createBottomTabNavigator();
export default function App() {
return (
<NavigationContainer>
<Tab.Navigator>
<Tab.Screen name='Home' component={Home} />
</Tab.Navigator >
</NavigationContainer>
)
}
I display the bottom tabs, but I see the navigation at the top that shows “Home” as with StackNavigator. I want there to be no true field
Advertisement
Answer
To Hide bottom tab label
const Tab = createBottomTabNavigator();
export default function App() {
return (
<NavigationContainer>
<Tab.Navigator
tabBarOptions={{
showLabel: false, // add this line to hide tab label
}}
>
<Tab.Screen name='Home' component={Home} />
</Tab.Navigator >
</NavigationContainer>
)
}