Skip to content

PropTypes: define children component type #1836

@SanderSpies

Description

@SanderSpies

I was looking for something like:

propTypes: {
  children: React.PropTypes.instanceOf(OtherComponent)
}

However this doesn't work of course and couldn't find another way of doing this.

Would be nice if this was supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions