react-navigation.github.io
react-navigation.github.io copied to clipboard
Hide bottom Tab issue
function HomeTabs() {
return (
<Tab.Navigator>
<Tab.Screen name="Home" component={Home} />
<Tab.Screen name="Feed" component={Feed} />
<Tab.Screen name="Notifications" component={Notifications} />
</Tab.Navigator>
);
}
function App() {
return (
<Stack.Navigator>
<Stack.Screen name="Home" component={HomeTabs} />
<Stack.Screen name="Profile" component={Profile} />
<Stack.Screen name="Settings" component={Settings} />
</Stack.Navigator>
);
}
in this abouve example Only home have stack ..if i hade STACK for Profile and settings ..what should i do ??. also i dont want see the tab in side the Stack.
Whenever you want to hide the tab navigator under the stack, try to reorganize your navigation by putting the tab inside the stack navigator. The above example is great when you don't want to display Tab's when you are either in the Profile or Settings screens.
you probably want to nest stack navigators inside your tab navigators, you are currently doing the opposite.
so in your tab navigator, every screen could be its own stack navigator. then you would have tabs shown on every screen.
if you dont need multiple screens for profile and settings, they dont necessarily need to be an entire stack navigator.