React - Native Navigation Drawer Navigation Nested navigation

Currently, in a react based app I am building, I have a Drawer Navigator that includes two screens. For navigation, I use interactive navigation. https://reactnavigation.org/docs/intro/

The code is as follows:

import { DrawerNavigator } from 'react-navigation'
export  default drawernav = DrawerNavigator(
     {
        Login: {Screen: Login},
        Main : {Screen: Main }
     }
) 

      

Even though Login is inside the drawer navigator, I want no drawer navigation functionality on the login screen, but the main screen works with login and main as two parameters in the drawer navigator. However, there is also the inbox navigator on the login screen now. Is there a way that the Login drawer navigation function disappears?

+3


source to share


1 answer


You want to change your navigation structure. At the root should be StackNavigator

, which will contain LoginScreen

and DrawerNavigator

. The screen in DrawerNavigator

will most likely be StackNavigator

s. Those StackNavigator

will contain screen components with your code.



0


source







All Articles