Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Memoize makeStyledComponent wrapped component #17

@gksander

Description

@gksander

The makeStyledComponent function wraps a component and adds classes and darkClasses props, which accept an array. If users inline these values, these props will technically change each re-render (based on React's default comparison algo).

We might consider writing a custom comparison function and wrapping the returned component in React.memo so that we can smartly compare these additional props and potentially avoid unnecessary re-renders.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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