No Description

index.android.js 1.0KB

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