Skip to content

Set State in Unmounted Component Warning #690

Closed
@rmorshea

Description

@rmorshea
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions