React.createElement
एक प्रसार लेता है" बच्चों "पैरामीटर`React.createElement` बच्चों पैरामीटर (jsx के बिना)
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?
}
})
का उपयोग करने पर किसी भी प्रलेखन नहीं मिल सकता है
मुझे यकीन है कि यह वास्तव में वास्तव में एक सरल जवाब है।
आह धन्यवाद। 'प्रोप' के अंदर * अंदर * कभी नहीं सोचा –