Request cancelled from unmounted component is trying to set state
mcgrathg opened this issue · 1 comments
mcgrathg commented
When the component using this hook is unmounted, it cancels the request, which causes it to catch the error generated from the cancellation.
It then tries to update the state on an unmounted component resulting in this error:
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 a useEffect cleanup function.
int64ago commented
Via v1.1.3