What is the right way to cancel all async/await tasks within an useEffect hook to prevent memory leaks in react?
问题 I am working on a react chap app that pulls data from a firebase database. In my "Dashboard" component I have an useEffect hook checking for an authenticated user and if so, pull data from firebase and set the state of a an email variable and chats variable. I use abortController for my useEffect cleanup, however whenever I first log out and log back in I get a memory leak warning. index.js:1375 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it