onflow-rn-splash-screen
v1.0.3
Published
Animated splash screen component for React Native.
Readme
onflow-rn-splash-screen
Animated splash screen component for React Native.
Installation
npm install onflow-rn-splash-screen
# or
yarn add onflow-rn-splash-screenUsage
import React, { useEffect, useState } from "react";
import { AnimatedSplash } from "onflow-rn-splash-screen";
const App = () => {
const [showSplash, setShowSplash] = useState(true);
useEffect(() => {
const timeout = setTimeout(() => {
setShowSplash(false);
}, 1000);
return () => clearTimeout(timeout);
}, []);
return (
<>
<AnimatedSplash
isVisible={showSplash}
onHideComplete={() => {
// splash hidden
}}
/>
{/* your app content */}
</>
);
};
export default App;Props
| Prop | Type | Required | Description |
| ---------------- | ------------ | -------- | -------------------------------------------------- |
| isVisible | boolean | Yes | Controls whether the splash is visible. |
| onHideComplete | () => void | No | Callback fired after the hide animation completes. |
License
UNLICENSED
