microsoft/vscode-react-native
Publicmirrored from https://github.com/microsoft/vscode-react-nativeAvailable
test/resources/sampleReactNative022Project/index.ios.js
52lines · modeblame
709d21f2digeff10 years ago | 1 | /** |
| 2 | * Sample React Native App | |
| 3 | * https://github.com/facebook/react-native | |
| 4 | */ | |
| 5 | | |
| 6 | import React, { | |
| 7 | AppRegistry, | |
| 8 | Component, | |
| 9 | StyleSheet, | |
| 10 | Text, | |
| 11 | View | |
| 12 | } from 'react-native'; | |
| 13 | | |
| 14 | class EmptyRNProject extends Component { | |
| 15 | render() { | |
| 16 | return ( | |
| 17 | <View style={styles.container}> | |
| 18 | <Text style={styles.welcome}> | |
| 19 | Welcome to React Native! | |
| 20 | </Text> | |
| 21 | <Text style={styles.instructions}> | |
| 22 | To get started, edit index.ios.js | |
| 23 | </Text> | |
| 24 | <Text style={styles.instructions}> | |
| 25 | Press Cmd+R to reload,{'\n'} | |
| 26 | Cmd+D or shake for dev menu | |
| 27 | </Text> | |
| 28 | </View> | |
| 29 | ); | |
| 30 | } | |
| 31 | } | |
| 32 | | |
| 33 | const styles = StyleSheet.create({ | |
| 34 | container: { | |
| 35 | flex: 1, | |
| 36 | justifyContent: 'center', | |
| 37 | alignItems: 'center', | |
| 38 | backgroundColor: '#F5FCFF', | |
| 39 | }, | |
| 40 | welcome: { | |
| 41 | fontSize: 20, | |
| 42 | textAlign: 'center', | |
| 43 | margin: 10, | |
| 44 | }, | |
| 45 | instructions: { | |
| 46 | textAlign: 'center', | |
| 47 | color: '#333333', | |
| 48 | marginBottom: 5, | |
| 49 | }, | |
| 50 | }); | |
| 51 | | |
| 52 | AppRegistry.registerComponent('EmptyRNProject', () => EmptyRNProject); |