Skip to content

Custom propTypes validators #1

Closed
@eps1lon

Description

@eps1lon

How could I allow custom validators that cannot be expressed with static types?

For example certain components might map+clone their children in which case React.Fragment blocks this composition. I would like to validate that none of the children is a React.Fragment which is currently impossible to express with TypeScript and needs a custom propTypes validator.

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