Skip to content

Stop defensively copying style object in DOMComponent._updateDOMProperties #2008

@chenglou

Description

@chenglou

Right now, we copy it in one of the hottest paths of React to allow users to mutate the style object afterward. I've come to realize that this pattern doesn't come up that often, since the style's often created inline inside render and not retained after that.

Additionally, Object.assign is coming soon, so people could always clone the style themselves if there's the need.

@jordwalke

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