Hacker News new | past | comments | ask | show | jobs | submit login

not to mention, web components come with their own complexity around shadow tree and the question of how to style/interact within the component tree from outside etc.



You don't have to use the shadow DOM, you can use the light DOM, but then you lose slots. I think they should really prioritize using slots with the light DOM as it would make it easier to incorporate web components into existing sites.


I don’t see how light DOM slots could work since it’s just replacing element.innerHTML, but a non-style-encapsulating shadow DOM option would be great.

That, and some progress on template instantiation, reactive DOM primitives or DOM partials, so we don’t have to concatenate strings and overwrite el.shadowRoot.innerHTML, or do direct DOM manipulation for any updates.

Until that all exists, and there’s a simple API to bring it all together, other frameworks will eat this space completely.


Not mandatory to use the Shadow DOM. And you can easily add public methods to the component for external interaction.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: