Cara mengatasi hal ini bisa kita pisah dulu functionnya, lalu kita load pada useEffect();
Error event
Set new functions
const setToVarData = async () => { try { setJmlBrand(await AsyncStorage.getItem('JML_DATA_BRAND_LOAD')); setStatusUser(await AsyncStorage.getItem('STATUS_USER')); } catch (error) { Sentry.captureException(error); } };
Set in new useEffect
useEffect(() => { setToVarData(); }, []);
Sumber Fix Issue: https://medium.com/geekculture/react-uncaught-typeerror-destroy-is-not-a-function-192738a6e79b
Top comments (0)