Let's implement React Navigation v2:
- Include createDrawerNavigation and DrawerItems from react-navigation and the components we want to render as sections (Home and Configuration):
// Dependencies import React, { Component } from 'react'; import { StyleSheet, View, ScrollView, Image } from 'react- native'; // React Navigation import { createDrawerNavigator, DrawerItems } from 'react- navigation'; // Components import Home from './sections/Home'; import Configuration from './sections/Configuration';
File: App.js
- In CustomDrawerComponent, we will render the Codejobs logo and the menu (you can modify this as you need it):
// Custom Drawer Component // Here we are displaying the menu options // and customizing our drawer ...