From 27c09e565d98f902d798ffd2f7348f1b5d71d54f Mon Sep 17 00:00:00 2001 From: Jonathan Lehman Date: Mon, 9 Nov 2015 10:32:40 -0500 Subject: [PATCH] Pass props to single child even if not using a wrapper --- src/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.js b/src/index.js index e765c26..cd6994c 100644 --- a/src/index.js +++ b/src/index.js @@ -92,6 +92,11 @@ var mq = React.createClass({ props, this.props.children ); + } else if (props) { + return React.cloneElement( + this.props.children, + props + ); } else { return this.props.children; }