- From: Joseph Orbegoso Pea <notifications@github.com>
- Date: Tue, 18 Oct 2016 15:26:56 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Message-ID: <w3c/webcomponents/issues/589/254657670@github.com>
What I like about React, is that distribution into the inner tree doesn't involve elements, which is what indirectly inspired me to write this idea. In React, the HTML markup is separate from distribution logic. The markup is just that, markup representing content, not any sort of logic. For example, in React: ```jsx function SomeReactComponent(props) { return ( <div slot="slotName"> <img><br> {props.children /* we insert children here */ } </div> ) } ``` or ```jsx function SomeReactComponent(props) { return ( <div slot="slotName"> <img> {props.children /* we insert children here */ } <br> </div> ) } ``` or ```jsx function SomeReactComponent(props) { return ( <div slot="slotName"> {props.children.filter(child => ... ) /* we insert some children here */ } <img> <br> {props.children.filter(child => !... ) /* and put the rest here */ } </div> ) } ``` See how that is separate from the markup which defines the content? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/589#issuecomment-254657670
Received on Tuesday, 18 October 2016 22:27:24 UTC