Skip to content

Element migration from one parent to another. #7460

Closed
@kof

Description

@kof

Do you want to request a feature or report a bug?

Feature request.

What is the current behavior?

Currently there is no high performance way to move a rendered element from one parent to another. It causes a lot of overhead, because it requires a full mountComponent in the new place, even if we reuse the component instance itself.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

All.

Why we need this

I am trying to optimize one specific case: I need to render a component invisibly in order to measure it's dimensions. After that I need to render same component in the visible area. Currently I need to buy an overhead (in my case 15-50ms) to do so, where in fact, when done in pure DOM, it is a simple .appendChild call with almost no overhead.

To be more specific here, I am talking about react-virtualized library and more specific it's CellMeasurer component, which can become 50% faster if we can avoid that overhead.

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