yarn react-native-bootsplash 3.0.0

latest releases: 6.0.0-beta.8, 6.0.0-beta.7, 6.0.0-beta.6...
3 years ago
  • The codebase has been rewritten in TypeScript, the bundling is now handled by 👷‍♂️ @react-native-community/bob
  • The API is now Promise based: hide and show 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 and show methods duration config has been replaced with a simple fade 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>;
}

Don't miss a new react-native-bootsplash release

NewReleases is sending notifications on new releases.