Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Don't pass children to React component if not present #163

Description

@thany

Consider this React component called in a Vue template:

<hello-from-react />

Couldn't be simpler. But it passes children which aren't there at all. Using forbidExtraProps from airbnb-prop-types it fails prop-type validation.

Please ONLY pass children if a component has content, a <slot>, or an explicit children prop.

Same problem occurs in that other superfluous prop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions