I'm using react-native 0.28.0
I'm trying to show an image on iPhone simulator according to this tutorial: http://www.appcoda.com/react-native-introduction/
var styles = StyleSheet.create({image: { width: 107, height: 165, padding: 10 }}var imageURI = 'http://books.google.com/books/content?id=PCDengEACAAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api'
Then in the render()
function, I add this:
<Image style={styles.image} source={{uri:imageURI}} />
The space allocated for the image is there, but the image is not shown.
However, if I use local image instead, the image will be shown.
var Picture = require('./content.jpeg')
In render()
function:
<Image source={Picture} style={styles.thumbnail} />
How can I show picture using URI as source?