My app has 5 components (screens), I am using stack navigation version 5, I need the headers for all screens except one screen, I tried to do this via option inside screens like this:
This is my code:
const Stack = createStackNavigator();
const MainStack = () => ({
return(
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="MyTabs" component={MyTabs} />
<Stack.Screen name="Direct" component={Direct} />
<Stack.Screen name="Like" component={Like} />
<Stack.Screen name="Search" component={Search} />
<Stack.Screen name="Home" component={Home} />
</Stack.Navigator>
</NavigationContainer>
)
)}
static navigationOptions = { header:null }
. I am not sure if it will work on React Navigation v5. – Vibrationstatic navigationOptions
doesn't work in version 5 – Minyan