react-navigation.github.io icon indicating copy to clipboard operation
react-navigation.github.io copied to clipboard

Hide bottom Tab issue

Open thareekanvar opened this issue 2 years ago • 1 comments

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.

thareekanvar avatar Jun 30 '22 03:06 thareekanvar

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.

Raj-Madheshia avatar Jul 16 '22 05:07 Raj-Madheshia

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.

Adnan-Bacic avatar Sep 13 '22 07:09 Adnan-Bacic