Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to Avoid the White Flash with React Native

Tags:

I am using React Native on Android and I am trying to figure out how to avoid the white flash before the React Native Portion of the app starts

The only way I have been able to stop it is by setting the app theme background color, to the same color of my app splashscreen, the issue with that is if you open up the keyboard, you'll briefly see the background of the app near the keyboard...in my scenario creating a blue flash at the bottom of the page

A solution to this would be somehow changing the apps theme color from blue back to white after the app loaded, but that dosen't seem possible. If the background color was white, you wouldn't see a flash..

any ideas?

like image 590
J DOe Avatar asked Apr 03 '18 21:04

J DOe


2 Answers

Please try react-native-splash-screen

Here is an article may also help How to Add a Splash Screen to a React Native App

like image 184
Kevin Avatar answered Nov 30 '22 23:11

Kevin


if you're building an app for ios only, you may use the loadingView functionality as described here, otherwise you'll need a splash screen library that will allow to control hiding the splash image from JS

like image 44
vonovak Avatar answered Dec 01 '22 00:12

vonovak