how to hide header in react navigation
<Stack.Navigator
screenOptions={{
headerShown: false
}}
>
<Stack.Screen name="route-name" component={ScreenComponent} />
</Stack.Navigator>
how to hide header in react navigation
<Stack.Navigator
screenOptions={{
headerShown: false
}}
>
<Stack.Screen name="route-name" component={ScreenComponent} />
</Stack.Navigator>
remove header from certain pages react navigation
<Stack.Screen
name="Home"
component={Home}
options={{header: () => null}}
/>
get rid of header bar react native
navigationOptions: { headerShown: false }
react native navigation remove top header screen
// This using the @react-navigation/material-top-tabs from the
// stackoverflow source...
export default class Login extends Component {
static navigationOptions = {
header: null
}
}
// Didn't work for me but it did give me a clue. I ended up
// setting the header to return a basically a blank
setTimeout(() => {
navigation.setOptions({
header: () => (
<View style={{ backgroundColor: "white" }}>
<Text
style={[
{ color: "white" },
Platform.OS === "android" ? { fontSize: 20 } : { fontSize: 1 }
]}
>
.
</Text>
</View>
)
});
}, 1);
// Note: in iOS sumulation, I had to tweak the initial fontSize
// to get it to not show on reload... Hence the addition of the
// setTimeout. Yes there is a blink, but now at least I don't
// have to do the tweak to start with. Not sure if this really
// works on an iOS device. Don't have a real one to test on.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us