Many template languages have \"slots\" or \"yield\" statements, that allow to do some sort of inversion of control to wrap one template inside of another.
Angular ha
In addition to Sophie's answer, I also have found a use in sending in child component types, doing something like this:
var ListView = React.createClass({
render: function() {
var items = this.props.data.map(function(item) {
return this.props.delegate({data:item});
}.bind(this));
return {items}
;
}
});
var ItemDelegate = React.createClass({
render: function() {
return - {this.props.data}
}
});
var Wrapper = React.createClass({
render: function() {
return
}
});