Skip to content

prop-types: children and React.VFC #2913

Open
@MOZGIII

Description

@MOZGIII

There is now a way to properly communicate the absence of the children prop at the TypeScript level: React.VFC (vs React.FC).
React.VFC aka React.VoidFunctionComponent does not allow children prop, the prop-types rule should derive the presence/absence of children from the underlying TypeScript types (when used with TypeScript).

Related: #7.

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