somu saran
somu saran

Reputation: 11

How to fix the white screen it appears after splash screen - react native

Im having a issue that white screen appears after splash screen loads and the app gets started .

I have already tried with some codes and using js and native but does't work

   componentwillmount{
 splashscreen.hide();
}

Upvotes: 1

Views: 1513

Answers (1)

Hanish Sharma
Hanish Sharma

Reputation: 869

In case of Android put android:windowDisablePreview into your styles.xml. I hope it will help you.

<!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowDisablePreview">true</item>
        <item name="colorPrimaryDark">@color/status_bar_color</item>
        <!-- Customize your theme here. -->
    </style>

Please try the below code as well.

componentDidMount() {
    setTimeout(() => {
      SplashScreen.hide()
    }, 300)
} 

Upvotes: 1

Related Questions