Next, we will modify the root index.android.js file so that it does the following:
- Renders a DrawerLayoutAndroid component wrapped around Icon.ToolbarAndroid and Navigator.
- Imports and sets the renderNavigationView of DrawerLayoutAndroid to the Drawer component we created.
- Creates a callback to open DrawerLayoutAndroid.
- Writes a callback named _navigateTo that navigates to a given index. Pass this to LoginPage as a prop.
- Imports and renders the App, LoginPage, PostView, and WebViewComponent components using the renderScene callback in Navigator:
// Friends/index.android.js import React, { Component } from 'react'; import { AppRegistry, DrawerLayoutAndroid, Navigator, StyleSheet, View } from 'react-native'; ...