I want to hide header because I already have styled Toolbar in code:
import {createStackNavigator}
from \'react-navigation\'
const AppStackNavigator = createStac
For hiding headers for specific screens or globally, you can do
const StackNavigator = createStackNavigator({
Home: {
screen: HomePage,
navigationOptions: {
header: null // Will hide header for HomePage
}
}
}, {
navigationOptions: {
header: null // Will hide header for all screens of current stack navigator,
headerLeft: <HeaderLeft /> // Component to be displayed in left side of header (Generally it can be Hamburger)
headerRight: <HeaderRight /> // Component to be displayed in right side of header
}
})
Also note that, screen specific settings will override global settings. Hope, this helps.
I used following code to hide the header.
{
navigationOptions: {
header: null // Will hide header for all screens of current stack
}