Created
November 18, 2015 17:11
-
-
Save markthethomas/5ea73992bd2fa1daad8f to your computer and use it in GitHub Desktop.
React native quickstart
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'; | |
const React = require('react-native'); | |
let { | |
AppRegistry, | |
StyleSheet, | |
Text, | |
View, | |
Image, | |
} = React; | |
const endemic = React.createClass({ | |
render() { | |
return ( | |
<View style={styles.container}> | |
<Text style={styles.welcome}> | |
Welcome to My Cool New App! | |
</Text> | |
<Image source={require('./assets/images/videos-blue.jpg')}/> | |
<Text style={styles.instructions}> | |
To get started, edit index.ios.js | |
</Text> | |
<Text style={styles.instructions}> | |
Press Cmd+R to reload,{'\n'} | |
Cmd+D or shake for dev menu | |
</Text> | |
</View> | |
); | |
} | |
}); | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
justifyContent: 'center', | |
alignItems: 'center', | |
backgroundColor: '#F5FCFF', | |
}, | |
welcome: { | |
fontSize: 20, | |
textAlign: 'center', | |
margin: 10, | |
}, | |
instructions: { | |
textAlign: 'center', | |
color: '#333333', | |
marginBottom: 5, | |
}, | |
}); | |
AppRegistry.registerComponent('endemic', () => endemic); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment