Created
November 25, 2018 15:58
-
-
Save rocksinghajay/4f6e3c8f15a79556fdc043a40969b670 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Sample React Native App | |
| * https://github.com/facebook/react-native | |
| * | |
| * @format | |
| * @flow | |
| */ | |
| import React, {Component} from 'react'; | |
| import {Platform, StyleSheet, Text, View} from 'react-native'; | |
| 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', | |
| }); | |
| type Props = {}; | |
| export default class App extends Component<Props> { | |
| render() { | |
| return ( | |
| <View style={styles.container}> | |
| <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> | |
| </View> | |
| ); | |
| } | |
| } | |
| const styles = StyleSheet.create({ | |
| container: { | |
| flex: 1, | |
| justifyContent: 'center', | |
| alignItems: 'center', | |
| backgroundColor: 'darkred', | |
| }, | |
| welcome: { | |
| fontSize: 20, | |
| textAlign: 'center', | |
| margin: 10, | |
| color: '#fff' | |
| }, | |
| instructions: { | |
| textAlign: 'center', | |
| color: '#fff', | |
| marginBottom: 5, | |
| }, | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment