forked from KevinHu2014/RN-IceSpeed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNavBox.js
40 lines (34 loc) · 739 Bytes
/
NavBox.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
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
TouchableHighlight,
Navigator,
} from 'react-native';
import Box from './Box';
import SplashScreen from "rn-splash-screen";
var NavBox = 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: Box,
}}
/>
);
}
});
module.exports = NavBox;