2015-09-14 14:35:58 +00:00
|
|
|
/**
|
|
|
|
* Sample React Native App
|
|
|
|
* https://github.com/facebook/react-native
|
2018-05-11 19:43:49 +00:00
|
|
|
*
|
|
|
|
* @format
|
2018-08-09 15:32:04 +00:00
|
|
|
* @flow strict-local
|
2015-09-14 14:35:58 +00:00
|
|
|
*/
|
2016-03-06 17:00:29 +00:00
|
|
|
|
2018-05-11 19:43:49 +00:00
|
|
|
import React, {Component} from 'react';
|
|
|
|
import {Platform, StyleSheet, Text, View} from 'react-native';
|
2015-09-14 14:35:58 +00:00
|
|
|
|
2017-08-03 20:52:06 +00:00
|
|
|
const instructions = Platform.select({
|
2018-05-11 19:43:49 +00:00
|
|
|
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
|
|
|
|
android:
|
|
|
|
'Double tap R on your keyboard to reload,\n' +
|
2017-08-03 20:52:06 +00:00
|
|
|
'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}>
|
2018-05-11 19:43:49 +00:00
|
|
|
<Text style={styles.welcome}>Welcome to React Native!</Text>
|
|
|
|
<Text style={styles.instructions}>To get started, edit App.js</Text>
|
|
|
|
<Text style={styles.instructions}>{instructions}</Text>
|
2015-09-14 14:35:58 +00:00
|
|
|
</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,
|
|
|
|
},
|
|
|
|
});
|