- The codebase has been rewritten in TypeScript, the bundling is now handled by 👷♂️ @react-native-community/bob
- The API is now Promise based:
hide
andshow
are now resolved only when your app has focus - A new
getVisibilityStatus()
method is available - The CLI tool has been updated to become a react native CLI plugin:
npx react-native generate-bootsplash assets/logo.png \
--background-color=F5FCFF \
--logo-width=100 \
--assets-path=assets
Breaking changes
- Deprecate iOS 9.x support
- The
hide
andshow
methodsduration
config has been replaced with a simplefade
boolean:
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("fading is over"))
+ .catch(() => console.log("cannot be hidden"));
}, []);
return <Text>My awesome app</Text>;
}