Skip to content

Add shouldForwardProp method #555

@Pytal

Description

@Pytal

Describe the feature

A shouldForwardProp config method should be added so that custom props don't leak into the DOM.

This feature was recently added to styled-components/styled-components#3006.

Motivation

I often use custom boolean props to toggle styles but since boolean attributes are not valid in the DOM React complains about them.

shouldForwardProp would allow you to explicitly define which props should be passed to the DOM and which props are for internal use.

Related Issues

#256

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature: proposal 💬New feature proposal that needs to be discussedneeds: investigation 🔎Issue has to be investigated for reason or solutionneeds: more info ℹNot enough information was provided to work on issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions