Skip to content

My simple example to show how to structure a React Native app with createDrawerNavigator and createStackNavigator

Notifications You must be signed in to change notification settings

xke/SimpleReactDrawerNavigationExample

Repository files navigation

Simple React Drawer Navigation Example

My simple example to show how to structure a React Native app with createDrawerNavigator and createStackNavigator (from react-navigation).

App walkthrough:

Animated GIF

For ease of understanding, code components are all in App.js!

  1. The TouchableMenuIcon will always be displayed on the top-left hand side of the app
  2. Touching the menu icon opens up the SideMenu which you can style however you want
  3. A navigation stack RootStack holds the 3 screens in this example
  4. MyDrawerNavigator wraps the root stack and makes the side menu show up!

Setup commands:

  • npm install react-navigation --save
  • npm install
  • react-native run-ios

I went through a lot of other examples (many which didn't work as of July 2018) to come up with this one. Hopefully it will work when you try it out!

About

My simple example to show how to structure a React Native app with createDrawerNavigator and createStackNavigator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published