I want to create a drawer navigator using react navigation 4.x in react native, but not getting drawer menu in left side of the screen. Here is my code for the navigation component. It includes three screens First,Home and Login that i want to show in drawer menu.
import {
createSwitchNavigator,
createAppContainer,
//createDrawerNavigator,
// createBottomTabNavigator,
} from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import { createDrawerNavigator } from 'react-navigation-drawer';
import FirstScreen from '../screen/FirstScreen';
import HomeScreen from '../screen/HomeScreen';
import LoginScreen from '../screen/LoginScreen';
const AppStack = createStackNavigator ({
First: {screen: FirstScreen},
// Dashboard: {screen: AppDrawerNavigator},
Login: {screen: LoginScreen},
Home: {screen: HomeScreen},
})
const AppDrawerNavigator = createDrawerNavigator({
Dashboard: {screen:AppStack}
});
const switchNavigator = createSwitchNavigator({
First: {screen: FirstScreen},
Dashboard: {screen: AppDrawerNavigator},
Login: {screen: LoginScreen},
Home: {screen: HomeScreen},
});
const AppNavigator = createAppContainer(switchNavigator);
export default AppNavigator;