- SDK Version: 40.0.0
- Platform: Android
Noob here. startAsync prop in AppLoading doesnt seem to execute unless I pass “f()” instead of “f”. Im using this guide Waiting for Asynchronous Load in React Native | by Ben Aron Davis | Dev Genius
const [loading, setLoading] = useState (false)
const f = () => {
return async () => {
try {
console.log (‘something’)
const userStored = AsyncStorage.getItem(‘userStored’)
} catch (e) {
console.log(e)
}}}
if (!loading) {
return (
<AppLoading startAsync={f()} onFinish={() => setLoading(true)} onError={(e) => console.error(e)} />
)} else {
if (userStored){
return (
)} else {
return (
)}