2015-09-14 14:35:58 +00:00
|
|
|
/**
|
|
|
|
* Sample React Native App
|
|
|
|
* https://github.com/facebook/react-native
|
2016-05-10 10:10:04 +00:00
|
|
|
* @flow
|
2015-09-14 14:35:58 +00:00
|
|
|
*/
|
2016-03-06 17:00:29 +00:00
|
|
|
|
2016-04-19 12:10:23 +00:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import {
|
2017-08-03 20:52:06 +00:00
|
|
|
Platform,
|
2015-09-14 14:35:58 +00:00
|
|
|
StyleSheet,
|
|
|
|
Text,
|
2015-12-25 10:16:36 +00:00
|
|
|
View
|
|
|
|
} from 'react-native';
|
2015-09-14 14:35:58 +00:00
|
|
|
|
2017-08-03 20:52:06 +00:00
|
|
|
const instructions = Platform.select({
|
|
|
|
ios: 'Press Cmd+R to reload,\n' +
|
|
|
|
'Cmd+D or shake for dev menu',
|
|
|
|
android: 'Double tap R on your keyboard to reload,\n' +
|
|
|
|
'Shake or press menu button for dev menu',
|
|
|
|
});
|
|
|
|
|
2017-12-20 20:19:39 +00:00
|
|
|
type Props = {};
|
|
|
|
export default class App extends Component<Props> {
|
2015-12-25 10:16:36 +00:00
|
|
|
render() {
|
2015-09-14 14:35:58 +00:00
|
|
|
return (
|
|
|
|
<View style={styles.container}>
|
|
|
|
<Text style={styles.welcome}>
|
|
|
|
Welcome to React Native!
|
|
|
|
</Text>
|
|
|
|
<Text style={styles.instructions}>
|
2017-08-03 20:52:06 +00:00
|
|
|
To get started, edit App.js
|
2015-09-14 14:35:58 +00:00
|
|
|
</Text>
|
|
|
|
<Text style={styles.instructions}>
|
2017-08-03 20:52:06 +00:00
|
|
|
{instructions}
|
2015-09-14 14:35:58 +00:00
|
|
|
</Text>
|
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
2015-12-25 10:16:36 +00:00
|
|
|
}
|
2015-09-14 14:35:58 +00:00
|
|
|
|
2015-12-25 10:16:36 +00:00
|
|
|
const styles = StyleSheet.create({
|
2015-09-14 14:35:58 +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,
|
|
|
|
},
|
|
|
|
});
|