Answers for "hide header react native navigation"

5

hide header react navigation

Hide header in a single screen 
<Stack.Screen name='Home' component={HomeScreen} options={{headerShown: false}}/>
Posted by: Guest on June-18-2021
6

how to hide header in react navigation

<Stack.Navigator
  screenOptions={{
    headerShown: false
  }}
>
  <Stack.Screen name="route-name" component={ScreenComponent} />
</Stack.Navigator>
Posted by: Guest on October-04-2020
0

get rid of header bar react native

navigationOptions: { headerShown: false }
Posted by: Guest on September-07-2020
0

hiding header in a specific screen in react native

<Stack.Screen options={{headerShown: false}} name="route-name" component={ScreenComponent} />
Posted by: Guest on October-28-2020
0

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.
Posted by: Guest on May-02-2020

Code answers related to "hide header react native navigation"

Code answers related to "Javascript"

Browse Popular Code Answers by Language