2015-08-04 11:50:22 +00:00
|
|
|
/**
|
|
|
|
* Sample React Native App
|
|
|
|
* https://github.com/facebook/react-native
|
2016-04-01 15:53:28 +00:00
|
|
|
* @flow
|
2015-08-04 11:50:22 +00:00
|
|
|
*/
|
2016-03-06 17:00:29 +00:00
|
|
|
|
2016-04-19 12:10:23 +00:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import {
|
2015-08-04 11:50:22 +00:00
|
|
|
AppRegistry,
|
|
|
|
StyleSheet,
|
|
|
|
Text,
|
2015-12-25 10:16:36 +00:00
|
|
|
View
|
|
|
|
} from 'react-native';
|
2015-08-04 11:50:22 +00:00
|
|
|
|
2016-11-19 02:25:02 +00:00
|
|
|
export default class HelloWorld extends Component {
|
2015-12-25 10:16:36 +00:00
|
|
|
render() {
|
2015-08-04 11:50:22 +00:00
|
|
|
return (
|
|
|
|
<View style={styles.container}>
|
|
|
|
<Text style={styles.welcome}>
|
|
|
|
Welcome to React Native!
|
|
|
|
</Text>
|
|
|
|
<Text style={styles.instructions}>
|
|
|
|
To get started, edit index.ios.js
|
|
|
|
</Text>
|
|
|
|
<Text style={styles.instructions}>
|
|
|
|
Press Cmd+R to reload,{'\n'}
|
|
|
|
Cmd+D or shake for dev menu
|
|
|
|
</Text>
|
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
2015-12-25 10:16:36 +00:00
|
|
|
}
|
2015-08-04 11:50:22 +00:00
|
|
|
|
2015-12-25 10:16:36 +00:00
|
|
|
const styles = StyleSheet.create({
|
2015-08-04 11:50:22 +00:00
|
|
|
container: {
|
|
|
|
flex: 1,
|
|
|
|
justifyContent: 'center',
|
|
|
|
alignItems: 'center',
|
|
|
|
backgroundColor: '#F5FCFF',
|
|
|
|
},
|
|
|
|
welcome: {
|
|
|
|
fontSize: 20,
|
|
|
|
textAlign: 'center',
|
|
|
|
margin: 10,
|
|
|
|
},
|
|
|
|
instructions: {
|
|
|
|
textAlign: 'center',
|
|
|
|
color: '#333333',
|
|
|
|
marginBottom: 5,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2016-11-19 02:25:02 +00:00
|
|
|
AppRegistry.registerComponent('HelloWorld', () => HelloWorld);
|