3 ms·
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
by afavour 3y ago
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/ https://stenciljs.com/
When you consider the 100KB of bulk the React example brings with it the web component example is actually pretty impressive.