Aniket Rai
Aniket Rai

Reputation: 17

How to hide header navigation bar on react native navigation on expo?

// import statements

const screens = {
    
    home:{
        screen:home,
        navigationOptions: {
            headerShown:false,
          }
      
    }

const homeStack = createStackNavigator(screens);
export default NavigationContainer(homeStack);

i have kept the headerShown element as false still the header is visible, pls help..

Upvotes: 0

Views: 801

Answers (2)

Srishruthik Alle
Srishruthik Alle

Reputation: 488

It's navigationOptions: { header: { visible: false } } and please use react navigation 5

Upvotes: 0

Maxwell
Maxwell

Reputation: 546

If I'm not mistaken, I think it's 'screenOptions' instead of "navigationOptions' for using the property 'headerShown'.

Upvotes: 1

Related Questions