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

cd ios && pod install && cd ..

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>
);