Skip to content

Set State in Unmounted Component Warning #690

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

Closed
rmorshea opened this issue Feb 27, 2022 · 0 comments · Fixed by #691
Closed

Set State in Unmounted Component Warning #690

rmorshea opened this issue Feb 27, 2022 · 0 comments · Fixed by #691

Comments

@rmorshea
Copy link
Collaborator

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.
    at ImportedElement (http://127.0.0.1:7575/static/django_idom/client.js:31116:28)
    at Element (http://127.0.0.1:7575/static/django_idom/client.js:31050:20)

Originally posted by @Archmonger in #680 (comment)


I believe this is happening as a result of this promise which ought to be wrapped in useEffect. The setImportSource call should then be ignored if the ImportedElement has been unmounted.

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.

1 participant