Re:The Anatomy of Web Components
by ravenstine on Sunday July 28, 2019 @01:15PM
(#20548622)
There's that, and the fact that web component technology is really a set of convenient primitives that don't do anything better than libraries and frameworks, besides the fact that they come built in to the browser. Then of course there was the rash of bloggers who were huffing and puffing over how inferior web components are, despite how their existence and even the ability to define custom elements alone are a pretty good idea. From what I've read over the years, I think that there's been a lot of bad press early on, and perhaps there were some very misguided individuals who think that web components "fail" because they don't live up to React. The point was never to replace React. A lot of people are still complaining about the polyfills, even though the only thing it says about web components is that they will eventually have full support and not need polyfills. Above all, all the polyfills combined aren't even half the size of a lot of app builds in the wild.
To expect web components to "catch on" in the same way that React and Vue have is a bit dumb, but I would like to see them adopted in a way where there's a good story around their use in frameworks, rather than a replacement.
> Then of course there was the rash of bloggers who were huffing and puffing over how inferior web components are
Well, actually ©™️ ;) There was a rush of bloggers who claimed this was the glorious future available now, that you don't need any extra frameworks, and how everything is in the browser now.
But then people actually tried to use them. And found them, well, lacking.
So over the past few years the narrative shifted to "oh, web components is just a set of primitive APIs intended for library and framework developers only".
In other words, the timing was off and now everyone is using React instead. To gloss over some of the technical details like state management, ES6 out of the box and how JSX probably made sense to some people more than the Web Components spec.
Why React and Vue aren't leveraging it is probably because it's easier to roll their own than keep up with the living specification, and because the way they approach components is a bit different.