I'd like to be able to abort fetch in useEffect cleanup when my component is detaching.
🤔 Expected Behavior
useAsyncList should expose a method to abort all it's current ongoing fetches.
😯 Current Behavior
Abort is not possible. This causes a following message being thrown to console:
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
🙋 Feature Request
I'd like to be able to abort fetch in useEffect cleanup when my component is detaching.
🤔 Expected Behavior
useAsyncList should expose a method to abort all it's current ongoing fetches.
😯 Current Behavior
Abort is not possible. This causes a following message being thrown to console:
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.