Fully agree with the author. My biggest complaint about web components is that I don’t see a lot of advantages over using React, Svelte, or some other JS library. The author hints at this: if I’m already committing to a big JS build process, why wouldn’t I reach for one of these more ergonomic JS tools? Warm fuzzies for trying to use open standards isn’t enough to convince most people to switch away from more popular…
(Disclaimer: author and editor of the modern custom elements spec here.) The specific "failed promise" that I see is largely this positioning of web components vs. frameworks. How web components was originally envisioned was as leaf-node or light-DOM-using components, of the sort HTML already has. For example, , , , etc. Web components was supposed to give you the tools to create your own components of this sort, suc…
I think the desire to make Web Components a React competitor also comes in part from the movement towards 100% static sites, i.e. no server HTML generation. So if I'm building a shopping app, I would never create an HTML file with the following with proper declarative HTML:
Then, you can add interactivity with JS events or a JS framework. Instead, you'll just see:
where the data to render the child elements is dependent on an AJAX request that gets the initial data. Creating standalone, declarative, and well-scoped components is just not necessary in this case, since everything is done in JS anyways.