App.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <<<<<<< HEAD
  2. /**
  3. * Sample React Native App
  4. * https://github.com/facebook/react-native
  5. *
  6. * @format
  7. * @flow
  8. */
  9. import React from 'react';
  10. import {
  11. StyleSheet,
  12. View,
  13. Text,
  14. } from 'react-native';
  15. import React, {Component} from 'react';
  16. import {Platform, StyleSheet, Text, View} from 'react-native';
  17. const instructions = Platform.select({
  18. ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
  19. android:
  20. 'Double tap R on your keyboard to reload,\n' +
  21. 'Shake or press menu button for dev menu',
  22. });
  23. type Props = {};
  24. export default class App extends Component<Props> {
  25. render() {
  26. return (
  27. <View style={styles.container}>
  28. <Text style={styles.welcome}>Welcome to React Native!</Text>
  29. <Text style={styles.instructions}>To get started, edit App.js</Text>
  30. <Text style={styles.instructions}>{instructions}</Text>
  31. </View>
  32. );
  33. }
  34. }
  35. const styles = StyleSheet.create({
  36. container: {
  37. flex: 1,
  38. justifyContent: 'center',
  39. alignItems: 'center',
  40. backgroundColor: '#F5FCFF',
  41. },
  42. welcome: {
  43. fontSize: 20,
  44. textAlign: 'center',
  45. margin: 10,
  46. },
  47. instructions: {
  48. textAlign: 'center',
  49. color: '#333333',
  50. marginBottom: 5,
  51. },
  52. });