Setup

The Navigation router for React Native uses the underlying native APIs to provide faithful navigation on Android and iOS. Because it contains native code you have to eject from Expo or create your application using react-native init.

Install the three navigation packages from npm.

npm install navigation navigation-react navigation-react-native --save

The next step depends on the version of React Native.

//if React Native version >= 0.60
cd ios && pod install && cd ..

//if React Native version < 0.60
react-native link navigation-react-native

Replace the code in App.js with the following:

import React from 'react';
import {StateNavigator} from 'navigation';
import {NavigationHandler} from 'navigation-react';
import {NavigationStack} from 'navigation-react-native';

var stateNavigator = new StateNavigator([
]);

export default () => (
  <NavigationHandler stateNavigator={stateNavigator}>
    <NavigationStack />
  </NavigationHandler>
);