useEffect(async () => { try { ... } catch(error) { console.log(error) } //Clean up function. This prevents memory leaks. return () => { ... } })
https://stackoverflow.com/questions/59794079/memory-leak-issue-when-trying-to-update-state-in-useeffect-react-native