-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.android.js
More file actions
41 lines (36 loc) · 963 Bytes
/
index.android.js
File metadata and controls
41 lines (36 loc) · 963 Bytes
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
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableOpacity,
Navigator
} from 'react-native';
import Index from './src/container/Index.js';
export default class test extends Component {
render() {
// const { region } = this.props;
//console.log(region);
let defaultName = 'Index';
let defaultComponent = Index;
return (
<Navigator
initialRoute={{ name: defaultName, component: defaultComponent }}
configureScene={(route) => {
Navigator.SceneConfigs.PushFromRight.gestures=null;
return Navigator.SceneConfigs.FadeAndroid;
}}
renderScene={(route, navigator) => {
let Component = route.component;
return <Component {...route.params} navigator={navigator} />
}} />
);
}
}
AppRegistry.registerComponent('test', () => test);