-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathindex.android.js
39 lines (37 loc) · 1.04 KB
/
index.android.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
29
30
31
32
33
34
35
36
37
38
39
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {AppRegistry,
StyleSheet,
Text,
View,
Navigator
} from 'react-native';
import Main from './component/main/Main.js'
import Launcher from './component/main/Launcher.js';
class MeiTuan extends Component{
// 构造
constructor(props) {
super(props);
// 初始状态
this.state = {};
}
render(){
return (
<Navigator
initialRoute={{name:'启动页',component:Launcher}}
configureScene={()=>{
return Navigator.SceneConfigs.PushFromRight;
}}
renderScene={(route,navigator)=>{
let Component = route.component;
return <Component {...route.passProps} navigator={navigator}/>;
}}
/>
);
}
}
AppRegistry.registerComponent('MeiTuan', () => MeiTuan);