News for hackers. Stuff that matters.
Re:If Web Components are so great, why am I not using them? by afavour on Wednesday August 02, 2023 @07:06PM (#36979090)
Examples like this bug me. The React example is using a high level abstraction, the web component is directly using the API. A more accurate example would show how those React calls eventually boil down to document.createElement()

I don’t think the Web Components API was meant to be used directly all the time. You can use a framework like StencilJS:

https://stenciljs.com/

When you consider the 100KB of bulk the React example brings with it the web component example is actually pretty impressive.

There are no comments on this comment yet.