- Let's start by opening the App.js file. In this file, we'll be using the StackNavigator component provided by the react-navigation package. First, let's add the imports we'll be using in this file. HomeScreen is a component we will be building later in this recipe:
import React, { Component } from 'react'; import { StackNavigator } from 'react-navigation'; import HomeScreen from './HomeScreen';
- Now that we have our imports, let's use the StackNavigator component to define the first route; we'll be using a Home route with links that should be displayed using the React Native WebView component. The navigationOptions property allows us to define a title to be displayed in the navigation header:
const App = StackNavigator({ ...