Skip to content

HelmetDispatcher leaks when used in combination with Suspense #226

Description

@satoren

If Suspense occurs after render, componentWillUnmount is not called.
Therefore, instances added below will not be removed and will leak.

helmetInstances.add(this);

Also, it will not be updated properly.

https://react.dev/reference/react/Component#componentdidmount

Reference Articles (This is not my post.)

https://zenn.dev/mtblue81/articles/f88821a3c3392e
https://mtblue81.github.io/react-helmet-sample/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions