Closed taikn closed 6 years ago
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:
https://github.com/souporserious/react-measure/blob/d18b065a32eb9c63f47b225269992a4f16a6b39a/src/with-content-rect.js#L18
Maybe it can be altered to something more loose to accommodate both Functions and ReactElements?
children: PropTypes.oneOfType([PropTypes.element, PropTypes.func])
With the latest update (2.1.1) I get warnings like these:
Which are caused by this line here:
https://github.com/souporserious/react-measure/blob/d18b065a32eb9c63f47b225269992a4f16a6b39a/src/with-content-rect.js#L18
Maybe it can be altered to something more loose to accommodate both Functions and ReactElements?