Quiero verificar si el token de acceso está presente o no mientras se carga la pantalla de inicio. ¿Cómo hacer eso en la expo?
I found the solution :-) ``// import.... import * as SplashScreen from 'expo-splash-screen'; //....... //.......function const [appIsReady, setAppIsReady] = useState(false); //....... useEffect(()=>{ async function prepare() { try { await SplashScreen.preventAutoHideAsync(); await isUser(); // checking for token availability await new Promise(resolve => setTimeout(resolve, 2000)); } catch (e) { console.log(e); } finally { setAppIsReady(true); } }; prepare(); },[]); const onLayoutRootView = useCallback(async () => { if (appIsReady) { await SplashScreen.hideAsync(); } }, [appIsReady]); if (!appIsReady) { return null; }; return ( <NavigationContainer> <View style={{flex:1,backgroundColor:"#e0ab24"}} onLayout= {onLayoutRootView}> //.....(navigator) //.... </View> </NavigationContainer>``siga la documentación: https://docs.expo.dev/versions/latest/sdk/splash-screen/