Vyshak Krishna
Vyshak Krishna

Reputation: 51

Remove Default Splash screen in Expo ( React Native)

We have used React Native Expo for our development but while running the application we are getting a default splash screen other than our custom splash screen.

Can anyone help me to remove the default screen and set our custom splash screen.

Upvotes: 3

Views: 12141

Answers (4)

Moses tenai
Moses tenai

Reputation: 41

You cannot remove splash screen on expo. The only thing you would achieve by removing the "splash":{ "image":"./assets/splash.png", } is removing the default image displayed which will leave the splash screen as a blank white screen. Consider just updating the image being rendered on the splash screen

Upvotes: 0

atmaram
atmaram

Reputation: 510

For expo the splash-screen and icon are configured in app.json in project root.

Remove the expo.splash object definition there to get rid of default / customised Splash screen.

However, it is best practice to have a splash screen to any app to perform some background tasks e.g. Font loading, resource loading etc. otherwise OS will have render white screen which is annoying to end user.

Sample configuration with Splash screen -

{
  "expo": {
    "name": "App Name",
    "slug": "app-name-slug",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash_1.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    }
}

Remove the expo.splash from here.

Upvotes: 2

Preetham NT
Preetham NT

Reputation: 61

Remove, below code block to eliminate the splash screen.

"splash": {
  "image": "./assets/splash.png",
  ...
}

or replace the image value ("./assets/splash.png") in the above code to have your splash screen. from your app.json details in the official expo page

(Tested in android simulator)

Upvotes: 2

Garrix
Garrix

Reputation: 27

You can first remove expo with the command

yarn global remove cli-expo

or

npm -g uninstall expo-cli --save

and configure your splash-screen again.

Upvotes: -6

Related Questions