Skip to content

Instantly share code, notes, and snippets.

@copleykj
Created April 26, 2018 15:12
Show Gist options
  • Save copleykj/d4fd7cbb4faa6d3156baf11adeae0b87 to your computer and use it in GitHub Desktop.
Save copleykj/d4fd7cbb4faa6d3156baf11adeae0b87 to your computer and use it in GitHub Desktop.
React Navigation - StackNavigator nested in DrawerNavigator
import React from 'react';
import { StackNavigator, DrawerNavigator } from 'react-navigation';
import ScreenOne from '../screens/ScreenOne';
import ScreenTwo from '../screens/ScreenTwo';
import SideBar from '../components/SideBar';
const AppNavigator = StackNavigator({
FirstScreen: {
screen: ScreenOne,
},
SecondScreen: {
screen: ScreenTwo,
}
}, {
headerMode: 'none'
});
export default MainNavigator = DrawerNavigator({
Main: {
screen: AppNavigator,
}
}, {
contentComponent: props => <SideBar {...props} />
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment