Skip to content

Avoid unnecessary re-renders of wrapped component (HOC) #3

Open
@jotaen

Description

@jotaen

There is a style object that gets freshly created on the fly on every render. This makes the wrapped component also render every time again, because the object identity changes.

The solution would be to “cache” the style object in the component and only recompute it if necessary. (E.g. by means of componentWillReceiveProps or the like.)

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