2 ms·
What does that have to do with having composable components?
by thayne 7y ago
What does that have to do with having composable components?
- dmitriid 7y agoEverything. The only way the vanilla webcomponents are "composable" is through tons of boilerplate code using DOM APIs. You can't even re-create the example with list elements without tearing your hair out when using webcomponents. It's so bad that any examples showing "composability" immediately give up and use .innerHtml everywhere, and even then it's pretty bad. It's so bad, in fact, that people do anything to avoid writing vanilla and use lit-html (yay, programming with strings), Stencil, or even Preact (AMP switched to Preact to author components).