expo-splash-screen
Version: 55.0.6 Provides a module to keep the native Splash Screen visible until you choose to hide it. Useful for loading fonts, assets, or data before showing your app.Installation
Usage
API Reference
Methods
() => Promise<boolean>
Prevents the splash screen from auto-hidingCall this before rendering your root component to prevent the splash screen from disappearing automatically.
() => Promise<boolean>
Hides the splash screenCall this after your app has finished loading resources and is ready to display.
(options: SplashScreenOptions) => Promise<void>
Android only: Configure splash screen behavior
Examples
Basic Usage with Asset Loading
With React Navigation
Animated Splash Screen Transition
Error Handling
With Multiple Loading Steps
Configuration
Configure Splash Image
app.json:Advanced Configuration
TypeScript
Platform Support
On web, there is no native splash screen. Use a custom loading component instead.
Best Practices
- Call preventAutoHideAsync Early: Call it at the module level, before any component renders
- Always Hide: Always call
hideAsync()in afinallyblock to ensure the splash screen is hidden - Handle Errors: Catch and handle errors during loading to prevent stuck splash screen
- Optimize Loading: Only load critical resources during splash screen
- Test on Device: Splash screen behavior can differ between simulator and device