Skip to content

Commit

Permalink
2. Add navigator and, include cities list as first scene
Browse files Browse the repository at this point in the history
  • Loading branch information
patoroco committed May 20, 2016
1 parent df2f54f commit 2bd5768
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions 2TableView/App.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
import React from 'react';
import {
View,
Navigator,
} from 'react-native';

import ListOfCities from './ListOfCities'

export default React.createClass({
render() {
return (
<ListOfCities />
<Navigator
style={{flex: 1}}
initialRoute={{name: 'cities'}}
configureScene={(route) => Navigator.SceneConfigs.FloatFromRight}
renderScene={this._routeMapper}
/>
)
},

_routeMapper(route, navigator) {
if (route.name === 'cities') {
return <ListOfCities />
}

return null
}
})

0 comments on commit 2bd5768

Please sign in to comment.