Closed
Description
Briefly spoke to @petehunt about this. Tracking it with an issue.
There are times when having multiple insertion points would be useful. The old Web Components spec was looking to do this with the select
attribute of content
- http://www.w3.org/TR/components-intro/#insertion-points. I'm not sure what the current W3C plans are.
Pete said that this could be done for now by passing other children in as props. But it feels like a hack.
Riffing on that old spec's idea, something vaguely like this:
<div>
<div class="header">
{ select(this.props.children, '.title') }
</div>
{ this.props.children }
</div>
Where the .title
string is a CSS selector, and any matching elements are removed from the children
to avoid duplicate insertion.
Metadata
Metadata
Assignees
Labels
No labels