Skip to content

react/prop-types warns about destructured spread other properties #46

Closed
@rocketraman

Description

@rocketraman

Sometimes a component does not care about various properties it receives -- they are just passed on to children as-is, and as per the FB docs the canonical way to do this is via a destructuring assignment with a spread operator on the last variable.

prop-types warns that props validation is missing for that other variable:

warning  'other' is missing in props validation  react/prop-types

I don't think react/prop-types should raise a warning about these "other" 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