1

I have a Bottom tab bar navigator with three Tabs: HomeStack History Account the HomeStack is a a stack navigator of two screens: HomeScreen TestScreen

I would like to hide the header of the stack navigator in both screens , which is done and i would like to hide the header of the bottom tab navigator only in TestScreen

here's my code BottomTabBar component

<Tab.navigator
   screenOptions={{headerShown: true}
  <Tab.screen name='home' component={HomeStack}/>
  <Tab.screen name='history' component={HistoryScreen}/>
  <Tab.screen name='account' component={AccountScreen}/>
</Tab.navigator>

the stack navigator:

<Stack.navigator
    screenOptions={{headerShown: false}}>
  <Stack.screen name='home' component={HomeScreen}/>
  <Stack.screen name='history' component={TestScreen}/>
</Stack.navigator>

The problem is that the header of the bottom navigator is shown in both HomeScreen and TestScreen how an i achieve this behavior ?

Zero0
  • 371
  • 4
  • 15

0 Answers0