RN Navigation - Draw Navigator

0

My app will have several types of navigation on different screens. I started using the index with stacknavigator and on a second page I'm trying to set up DrawNavigator and I'm not getting it.

I saw in a sample post as if I had to start and register the app with the draw first. Is that right?

    
asked by anonymous 30.08.2017 / 02:17

1 answer

0

I was able to do using using Stack and drawer. In my case the drawer is Stack's first screen and it works. The code looks like this:

const Drawer = DrawerNavigator({
  HomeDrawer: {
    screen: HomeScreen
  },
  SettingsDrawer:{
    screen: SettingsScreen
  }
});
const App = StackNavigator({
  Drawer: {
    screen: Drawer,
  },
  Home: {
    screen: HomeScreen
  },
  Settings: {
    screen: SettingsScreen
  },
  View: { screen: ViewScreen },
})

export default App;

In this case Home and Settings are accessible from the drawer and view is only accessible from the stack.

    
14.09.2017 / 13:55