The previous example rendered navigation links as the main content. However, it's often better to place the navigation links in their own section. The Navigator
component lets you specify a navigation bar. Let's try this out now, starting with the main module:
import React from 'react'; import { AppRegistry, Navigator, } from 'react-native'; import routes from './routes'; import styles from './styles'; // Renders the scene, the "navigator" property // is no longer needed here since navigation is // now handled separately. const renderScene = route => (<route.Scene />); // The composition of the navigation bar is three components: // "Title", "LeftButton", and "RightButton". These // components come from the "route". const routeMapper = { Title: (route, navigator) => ( <route.Title navigator={navigator} /> ), LeftButton...