Created
December 22, 2015 02:36
-
-
Save remirobert/27beba94b8d7e100f077 to your computer and use it in GitHub Desktop.
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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
*/ | |
'use strict'; | |
var React = require('react-native'); | |
var { | |
AppRegistry, | |
StyleSheet, | |
Text, | |
View, | |
Image | |
} = React; | |
var gifTest = React.createClass({ | |
render: function() { | |
return ( | |
<View style={styles.container}> | |
<Image | |
style={styles.animatedImage} | |
source={{uri:"http://i.giphy.com/13YkBrhLJdziXm.gif"}}/> | |
<Text style={styles.welcomeText}> | |
{"Hello world !"} | |
</Text> | |
</View> | |
); | |
} | |
}); | |
var styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
justifyContent: 'center', | |
alignItems: 'center', | |
backgroundColor: 'black' | |
}, | |
animatedImage: { | |
width:200, | |
height:200 | |
}, | |
welcomeText: { | |
paddingTop: 40, | |
color:'white', | |
fontSize: 30 | |
} | |
}); | |
AppRegistry.registerComponent('gifTest', () => gifTest); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment