No Description

App.js 1.1KB

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