Currently Im trying to make a drawer using react-navigation. my react-navigation version is : "^1.0.0-beta.7"
Basically my structure of react-navigation look like this
StackNavigator as the root.. DrawerNavigator as the 2nd layer.. and another StackNavigator as the 3rd layer..
My problem is that when I put my component inside DrawerNavigator, The Component header will not show up after navigate to the component.. So, Im hoping anyone who can pointed to me how to make header visible when I put my component inside DrawerNavigator. If I did not put any component inside DrawerNavigator and all the screen inside the inner StackNavigator, the header will be visible but then the DrawerItems doesnt have any props thus not showing inside the drawer.
const rootNav = StackNavigator({
MainDrawerNavigator: { screen: MainDrawerNavigator }
}, {
headerMode: 'screen',
navigationOptions: { header: null }
})
const MainDrawerNavigator = DrawerNavigator({
Home: { screen: HomeNavigator },
Logout: { screen: Logout }
},{
initialRouteName: 'Home',
drawerWidth: 270,
headerMode: 'screen',
contentComponent: (props) => {
return(
<ScrollView>
<DrawerItems {...props} />
</ScrollView>
)
},
contentOptions: {
style: {
marginTop: 0,
}
}
})
const HomeNavigator = StackNavigator({
HomeMenu: { screen: HomeMenu },
StartJourney: { screen : StartJourney },
JournalList: { screen: JournalList },
)}
Hope anyone can help me with this. Thanks!
