Skip to content

Warn when a component is passed props that it doesn't need #2215

Closed
@jussi-kalliokoski

Description

@jussi-kalliokoski

It would be cool to be able to get warnings for typoed or otherwise extraneous props passed to a component, similar to how React.DOM warns if you pass class when you meant className.

With PropTypes.shape you could probably even ensure deep validity of the passed data. This would not only be useful for finding bugs, but also for optimizing hot components by making sure the shapes are aligned.

Obviously this would need some sort of opt-in, like propTypes.

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