3 ms·
They lacked native support at first, and the spec wasn't (and isn't) complete. Even though they had polyfills, Web Components were being promoted at a time wher
by ehnto 7y ago
They lacked native support at first, and the spec wasn't (and isn't) complete. Even though they had polyfills, Web Components were being promoted at a time where not many understood the benefits of component based development. It was too niche, and the idea of SPAs or single page applications was just catching on. They broke the ground, but it wasn't until other frameworks made it easier and popular that the idea caught on and the tool made sense to more people.
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.
- ravenstine 7y agoThere'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.
- dmitriid 7y ago> 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".