Show splash screen or loading indicator until ALL images are ready | Expo | React Native

Viewed 1459

My images take long time to load, I wanted a way to show some indicator unless all the images are loaded, How can I do that

I am using react native with expo.

I saw that to detect loading progess of image, onLoadEnd() callback is used, but I have plenty of images, and adding that callback to all of them seemed not the best way, I am hoping if there is some other way to do it

Thanks

1 Answers

If you follow the docs here

https://docs.expo.dev/versions/latest/sdk/splash-screen/

You will have a splash screen that will start appearing when the native app loads and will disappear after all the Javascript is loaded.

Ideally, you want to hide it at your initial navigation screen.

Related