Last active
March 29, 2018 21:36
-
-
Save matteocollina/4d6bc4dadabd3b3a98b8e223427b1fc8 to your computer and use it in GitHub Desktop.
Minimal react-native js file
This file contains 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
'use strict'; | |
import React from 'react'; | |
import ReactNative, { | |
AppRegistry, | |
StyleSheet, | |
Text, | |
View, | |
} from 'react-native'; | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
justifyContent: 'center', | |
alignItems: 'center', | |
backgroundColor: 'green', | |
}, | |
welcome: { | |
fontSize: 20, | |
color: 'white', | |
}, | |
}); | |
class StoryReactComponent extends React.Component { | |
render() { | |
return ( | |
<View style={styles.container}> | |
<Text style={styles.welcome}>We are live from React Native!</Text> | |
</View> | |
) | |
} | |
} | |
AppRegistry.registerComponent('StoryReactComponent', () => StoryReactComponent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment