161
rated 0 times
[
163]
[
2]
/ answers: 1 / hits: 17626
/ 9 Years ago, thu, may 7, 2015, 12:00:00
I'm tinkering with React Native and am trying to simply display an image with the image library from a URL. When I run this, all that is shown is the 'React Native' text, but no image. What am I doing wrong?
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Image,
Text,
View,
} = React;
var AwesomeProject = React.createClass({
render: function() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
React Native
</Text>
<Image
source={{uri: 'http://facebook.github.io/react/img/logo_og.png'}}
/>
</View>
);
}
});
More From » react-native