Responding to routes
Let's implement a simple UI with three scenes in it (remember, scenes are synonymous with pages). Each scene will link to the other two scenes so that you can actually navigate the application. Let's start with the main application module:
import React from 'react'; import { AppRegistry, Navigator, } from 'react-native'; import routes from './routes'; // Renders a scene. The "Scene" is a React component, and // is found as a property of the "route". The "navigator" // instance is passed to the scene as a property. const renderScene = (route, navigator) => ( <route.Scene navigator={navigator} /> ); // Renders a "<Navigator>" component. This is the root // component of the application because it manages // "scenes" that represent actual content. It's given // and "initialRoute" to render when the application // starts, and...