React.createElement
takes a spread "children" parameter
var d = React.DOM;
React.createElement(LabeledElement, {label: "Foo"},
d.input({value: "foo"})
)
but I can't find any documentation on how to actually use it
var LabeledElement = React.createClass({
render: function() {
return d.label({}
,d.span({classNames: 'label'}, this.props.label)
, //How to place children here?
}
})
I'm sure this has a really really simple answer.
children
property: frontarm.com/james-k-nelson/4-ways-pass-children-react-elementschildren
property: reactenlightenment.com/react-nodes/4.2.html