React.createElement принимает параметр "children" с расширением
var d = React.DOM;
React.createElement(LabeledElement, {label: "Foo"},
d.input({value: "foo"})
)
но я не могу найти документацию о том, как его использовать.
var LabeledElement = React.createClass({
render: function() {
return d.label({}
,d.span({classNames: 'label'}, this.props.label)
, //How to place children here?
}
})
Я уверен, что это действительно очень простой ответ.