How to cancel all subscriptions and asynchronous tasks in a useEffect cleanup function?
Even if the component is unmounted, useEffect will try to maintain contact with your data-fetching function. Because this is an anti-pattern that exposes your app to memory leaks, canceling your…