From 2bd57689fb9e382d36f862ee1e985aa0ece977d6 Mon Sep 17 00:00:00 2001 From: Jorge Maroto Date: Thu, 19 May 2016 19:25:48 +0200 Subject: [PATCH] 2. Add navigator and, include cities list as first scene --- 2TableView/App.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/2TableView/App.js b/2TableView/App.js index 61072fe..721e154 100644 --- a/2TableView/App.js +++ b/2TableView/App.js @@ -1,6 +1,6 @@ import React from 'react'; import { - View, + Navigator, } from 'react-native'; import ListOfCities from './ListOfCities' @@ -8,7 +8,20 @@ import ListOfCities from './ListOfCities' export default React.createClass({ render() { return ( - + Navigator.SceneConfigs.FloatFromRight} + renderScene={this._routeMapper} + /> ) }, + + _routeMapper(route, navigator) { + if (route.name === 'cities') { + return + } + + return null + } })