1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import {useEffect} from 'react' import * as SplashScreen from 'expo-splash-screen' type Props = { isReady: boolean } export function Splash({isReady, children}: React.PropsWithChildren<Props>) { useEffect(() => { if (isReady) { SplashScreen.hideAsync() } }, [isReady]) if (isReady) { return children } }