I think it's a desirable feature to be able to render alternative states for each individual image in the gallery, for instance, a "loading" component while the image is still loading (achieved with the onLoad event handler of react native's Image component), or an "error message" component if a load error occurs (Image.onError event handler).
My proposal is to add something like renderLoading and renderError optional props, which are functions that return the content to be shown in the respective cases.
I can volunteer to send a pull request with an implementation for this feature. Just let me know what you think about this.
Hi,
I think it's a desirable feature to be able to render alternative states for each individual image in the gallery, for instance, a "loading" component while the image is still loading (achieved with the
onLoad
event handler of react native'sImage
component), or an "error message" component if a load error occurs (Image.onError
event handler).My proposal is to add something like
renderLoading
andrenderError
optional props, which are functions that return the content to be shown in the respective cases.I can volunteer to send a pull request with an implementation for this feature. Just let me know what you think about this.
And thanks a lot for this package!