forked from KevinHu2014/RN-IceSpeed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNavInit.js
41 lines (34 loc) · 754 Bytes
/
NavInit.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
40
41
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
TouchableHighlight,
Navigator,
} from 'react-native';
import SplashScreen from "rn-splash-screen";
import AppInit from './AppInit';
var NavInit = React.createClass({
componentDidMount(){
SplashScreen.hide();
},
renderScene: function(route, navigator) {
var Component = route.component;
return (
<Component navigator={navigator} route={route} {...route.passProps} />
);
},
render: function() {
return (
<Navigator
ref="navigator"
style={{ flex: 1 }}
renderScene={this.renderScene}
initialRoute={{
component: AppInit,
}}
/>
);
}
});
module.exports = NavInit;