-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expose abort controller in useAsyncList #2217
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
🙋 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
📋 Waiting for Sprint