react-native-cacheable-image icon indicating copy to clipboard operation
react-native-cacheable-image copied to clipboard

Some images won't load when loading a lot of images

Open schlaegerz opened this issue 8 years ago • 1 comments

I was having some issue with some images not loading and I couldn't figure it out because it seem pretty random which ones would not load.

I found the problem is that you check "this.networkAvailable" to see if you have network, but there appears to be a race condition there "this.networkAvailable" is not set to true in time since it is dependent on an asychronous call.

By setting the prop networkAvaliable={true} I was able to completely get rid of this issue.

I think you should either default that to true, as an extra call when you don't have internet won't cause much harm, or you need to fix the race condition.

You should also probably note these parameters in the Readme.

Thanks for the otherwise great package!

schlaegerz avatar Jul 20 '17 23:07 schlaegerz

happens to me too. network is default to false that is why in android it doesn't load the image initially. but if you reload the app it will start to load the images.

narodejesus avatar Aug 10 '18 01:08 narodejesus