Skip to content

Hoist non react statics #1411

Description

@oliviertassinari

What will it allow you to do that you can't do today?

Solve mui/material-ui#9736 out of the box. We add a muiName static property to some of the Material-UI components. However, this static property is lost after wrapping the component with styled-components.

How will it make current work-arounds straightforward?

You are already solving the problem for withTheme:

import hoistStatics from 'hoist-non-react-statics'

What potential bugs and edge cases does it help to avoid?

It's making the styled component higher-order component transparent to static properties.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions