Skip to content

Proposal: Render loading and error states #41

@almirfilho

Description

@almirfilho

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'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.

And thanks a lot for this package!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions