I\'m using DrawerNavigator
and I have 3 pages: Router page
, mainScreen
and a photos page
,
I maked a header navbar are
when you defined screen in createStackNavigator , it by default pass a props called navigation,
something like this => navigation={this.props.navigation}
but when you using this.props.navigation.navigator("YOUR SCREEN ")
and didn't defined this screen at createStackNavigator you must pass the navigation={this.props.navigation}
form the screen that you defined in createStackNavigator and then you can use it in your component .