My React Native 0.61.5 uses react-navigation 5.1. Here is the root navigation code:
const BTab = createBottomTabNavigator();
const Stack = createStackNavigator();
export default function App() {
//const Appscreen = () => (<AppScreen data={data}/>);
return (
<NavigationContainer>
<Stack.Navigator InitialRouteName="Splash">
<Stack.Screen name="Splash" component={SplashScreen}}/>
<Stack.Screen name="App" component={AppScreen} } />
</Stack.Navigator>
</NavigationContainer>
);
}
The component AppScreen return a stack like this:
return (
<NavigationContainer independent={true}>
<BTab.Navigator>
<BTab.Screen name="Event" component={Eventstack} />
<BTab.Screen name="Group" component={Groupstack} />
<BTab.Screen name="Contact" component={Contactstack} />
</BTab.Navigator>
</NavigationContainer>
);
I notice that on the screen there are double header:

How can I remove the App header and only keep the Group?
add with the screen that you want to hide the header.
options= {{
headerShown: false
}}
For further reading, kindly have a look at https://reactnavigation.org/docs/stack-navigator/#headershown
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With