Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request cancelled from unmounted component is trying to set state #15

Closed
mcgrathg opened this issue Mar 17, 2019 · 1 comment · Fixed by #16
Closed

Request cancelled from unmounted component is trying to set state #15

mcgrathg opened this issue Mar 17, 2019 · 1 comment · Fixed by #16

Comments

@mcgrathg
Copy link

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
Copy link
Member

Via v1.1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants