message: Created navigators and scenes
diff: -/**
  - * Sample React Native App
  - * https://github.com/facebook/react-native
  - *
  - * @format
  - * @flow
  - */
  +import React from 'react';
  +import {StateNavigator} from 'navigation';
  +import {NavigationHandler} from 'navigation-react';
  +import {addNavigateHandlers, Scene} from 'navigation-react-native';
  +import Home from './Home';
  +import Notifications from './Notifications';
  +import Tweet from './Tweet';
  +import Timeline from './Timeline';
  +import {getHome, getFollows, getTweet, getTimeline} from './data';
  -import React, {Component} from 'react';
  -import {Platform, StyleSheet, Text, View} from 'react-native';
  +var stateNavigator = new StateNavigator([
  + {key: 'home'},
  + {key: 'notifications'},
  + {key: 'tweet', trackCrumbTrail: true},
  + {key: 'timeline', trackCrumbTrail: true}
  +]);
  +const {home, notifications, tweet, timeline} = stateNavigator.states;
  +home.renderScene = () => <Home tweets={getHome()} follows={getFollows()} />;
  +notifications.renderScene = () => <Notifications follows={getFollows()} />;
  +tweet.renderScene = ({id}) => <Tweet tweet={getTweet(id)} />;
  +timeline.renderScene = ({id}) => <Timeline timeline={getTimeline(id)} />;
  -const instructions = Platform.select({
  - ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
  - android:
  - 'Double tap R on your keyboard to reload,\n' +
  - 'Shake or press menu button for dev menu',
  -});
  +var stateNavigators = [stateNavigator, new StateNavigator(stateNavigator)];
  +stateNavigator.navigate('home');
  +stateNavigators[1].navigate('notifications');
  -type Props = {};
  -export default class App extends Component<Props> {
  - render() {
  - return (
  - <View style={styles.container}>
  - <Text style={styles.welcome}>Welcome to React Native!</Text>
  - <Text style={styles.instructions}>To get started, edit App.js</Text>
  - <Text style={styles.instructions}>{instructions}</Text>
  - </View>
  - );
  - }
  -}
  +addNavigateHandlers(stateNavigators);
  -const styles = StyleSheet.create({
  - container: {
  - flex: 1,
  - justifyContent: 'center',
  - alignItems: 'center',
  - backgroundColor: '#F5FCFF',
  - },
  - welcome: {
  - fontSize: 20,
  - textAlign: 'center',
  - margin: 10,
  - },
  - instructions: {
  - textAlign: 'center',
  - color: '#333333',
  - marginBottom: 5,
  - },
  -});
  +export default ({crumb, tab}) => (
  + <NavigationHandler stateNavigator={stateNavigators[tab]}>
  + <Scene crumb={crumb} tab={tab} />
  + </NavigationHandler>
  +);
  