Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

Accept only single child #17

Conversation

jaroslav-kubicek
Copy link
Contributor

Just a cosmetic update for propTypes declaration, render function always expects to render only one element, so in case I mistakenly provide more than one child it fails with error:

invariant.js?4599:39 Uncaught Invariant Violation: EventListener.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.

@oliviertassinari
Copy link
Owner

Right, the type needs to be less permissive. Thanks!

@oliviertassinari oliviertassinari merged commit 1a5ce90 into oliviertassinari:master Oct 12, 2016
@jaroslav-kubicek jaroslav-kubicek deleted the fix-proptypes-children branch October 13, 2016 07:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants