Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: React Navigation Header change with screen

Igor Martins:

I have a StackNavigation and want a default Header (component Header) and want that "deep pages" shows up with the default header generated for the React Navigation.

In my index page **Index**, just wanted the Header component(first header)...but shows up another blank header:

In my "deep page" **Teste** just want the title and back button autogenarated by RNav(second header)...but the first header shows up.

This is my nav config:


const RootNavigator = StackNavigator({
Welcome: {screen: Welcome},
User: {
screen: TabNavigator({
Clientes: {
screen: StackNavigator({
Index: {screen: Clientes},
Teste: {
screen: Teste,
header: undefined
}
}, {
header: null,
navigationOptions: {
tabBarIcon: () => (

)
}
})
},
Opcoes: { screen: Opcoes }
}, {
tabBarPosition: 'bottom',
tabBarOptions: {
showLabel: false,
activeTintColor: '#fff',
showIcon: true,
inactiveTintColor: '#ccc',
indicatorStyle: {
backgroundColor: '#ccc'
},
style: {
backgroundColor: '#536878'
}
}
})
},
}, {
initialRouteName: 'User',
navigationOptions: {
header: props =>
}
});

export default RootNavigator;



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: React Navigation Header change with screen

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×