duyluonglc / react-native-thumbnail-grid

75 stars 37 forks source link

Add support for Image source object #2

Closed aiham closed 7 years ago

aiham commented 7 years ago

I've added support for an Image source object rather than just a URI string.

Personally this allows me to provide custom headers to the HTTP request made by the Image component (Although the docs haven't been updated, Image does accept a headers object now).

You could also do this:

const images = [require('./first.png'), require('./second.png')];
<PhotoGrid source={images} onPressImage={image => this.showImage(image)} />