-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathindex.ios.js
28 lines (24 loc) · 849 Bytes
/
index.ios.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import React, {Component} from 'react';
import {AppRegistry, Text, View, Navigator} from 'react-native';
import Component5 from './app/components/Component5/Component5';
import Component6 from './app/components/Component6/Component6';
export default class myapp extends Component{
renderScene(route, navigator){
switch(route.id){
case 'component5':
return (<Component5 navigator={navigator} title="component5" />)
case 'component6':
return (<Component6 user={route.user} navigator={navigator} title="component6" />)
}
}
render(){
return(
<Navigator
initialRoute={{id: 'component5'}}
renderScene={this.renderScene}
configureScreen={(route, routeStack) => Navigator.SceneConfigs.FloatFromBottom}
/>
);
}
}
AppRegistry.registerComponent('myapp', () => myapp);