Skip to content

React DevTools might retain references to unmounted DOM elements (and their Fibers) #17624

@bgirard

Description

@bgirard

Screenshot 2019-12-16 10 51 05
There's seems to be circumstances where unmounted DOM/Fibers are kept alive by React DevTools. They're kept alive in primaryFibers:
https://github.com/facebook/react/blob/34527063083195558f98108cde10b5d6ad0d6865/packages/react-devtools-shared/src/backend/renderer.js#L772

It seems like a WeakSet would be appropriate and would remove the leak. Otherwise we'd need to understand why recordUnmount isn't called.

CC @bvaughn

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions