Skip to content

Question: Hold image in state until new image loads fully. #16

@firstChairCoder

Description

@firstChairCoder

Hello.

I have a use-case where I'm toggling through a array of images as a background using state (the state value being the index of the image in an array). So, switching through the images tends to leave the screen blank for about a second. I have tried preloading techniques and caching methods including using this library. While the gray screen goes after a while, the initial stage of refreshing the app still features that bug.

I figured it is likely because the image component unmounts when the source is changed. Just wanted to ask for any suggestions on how I could get rid of that gray screen using this wonderful package.

Thank you for your work in OpenSource. I consult your commits daily.

Cheers. 👍🏾

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions