forked from shedaltd/react-native-basics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
29 lines (27 loc) · 740 Bytes
/
app.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
const React = require('react-native');
const {AppRegistry, StyleSheet, Navigator, Text, View} = React;
const Lessons = require('./lessons');
const AwesomeProject = React.createClass({
render: function() {
return (<Navigator
initialRoute={{
name: 'Home',
component: Lessons
}}
sceneStyle={styles.container}
renderScene={(route, navigator) => {
const Component = route.component;
return <Component navigator={navigator}/>
}}
/>);
}
});
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
}
});
AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);