Even if a lot of changes landed, switching from v2 to v3 is actually quite easy 😎
- A switch to react-native CLI (
npx react-native generate-bootsplashinstead ofnpx generate-bootsplashto generate assets, please follow theREADME) - A complete rewriting in TS
- A Promise based API and UI thread pause handling (
hide/showpromises will be resolved only when the app has focus) - A new
getVisibilityStatus()method
import React, { useEffect } from "react";
import { Text } from "react-native";
import RNBootSplash from "react-native-bootsplash";
function App() {
useEffect(() => {
- RNBootSplash.hide({ duration: 250 });
+ RNBootSplash.hide({ fade: true }).then(() => {
+ console.log("bootsplash hidden!");
+ });
}, []);
return <Text>My awesome app</Text>;
}The generated BootSplash.storyboard has been modified.