Usually, a component's children (this.props.children) is an array of components:
var GenericWrapper = React.createClass({
componentDidMount: function() {
console.log(Array.isArray(this.props.children)); // => true
},
render: function() {
return <div />;
}
});
ReactDOM.render(
<GenericWrapper><span/><span/><span/></GenericWrapper>,
mountNode
);
However, when there is only a single child, this.props.children will be the single child co