Image from Google REST API won't display

96 views Asked by At

In React Native, I am trying to display an image that I retrieve from a fetch (I hard-coded the value here for the purpose of the example):

<Image
          source={uri:{'http://books.google.com/books/content?id=sNyBrgEACAAJ&printsec=frontcover&img=1&zoom=5&source=gbs_api'}}
        />

But this won't display anything... any idea how I could do this?

1

There are 1 answers

0
Martin Chinome On BEST ANSWER

enter image description here

UPDATE the form correct show image when you have a uri :

<Image  source={{ uri: 'https://books.google.com/books/content?id=sNyBrgEACAAJ&printsec=frontcover&img=1&zoom=5&source=gbs_api' }}
                    style={{width: 400, height: 400}}/>

review documentation oficial https://facebook.github.io/react-native/releases/0.21/docs/image.html