Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

PropType error: children must be single ReactElement #116

Closed
taikn opened this issue Sep 10, 2018 · 0 comments
Closed

PropType error: children must be single ReactElement #116

taikn opened this issue Sep 10, 2018 · 0 comments

Comments

@taikn
Copy link

taikn commented Sep 10, 2018

With the latest update (2.1.1) I get warnings like these:

Warning: Failed prop type: Invalid prop `children` of type `function` supplied to `_class`, expected a single ReactElement.

Which are caused by this line here:

children: PropTypes.element,

Maybe it can be altered to something more loose to accommodate both Functions and ReactElements?

children: PropTypes.oneOfType([PropTypes.element, PropTypes.func])
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant