I skimmed this. I use web components a lot. Unless I'm mistaken, they don't provide reactivity; you have to write that yourself. Reactivity was the feature that launched modern js frameworks so I think the article really overstates the case.
The article also misses something more important: broad native ES module support in browsers means you don't need a build step (webpack).
The "AI makes it easy!" part of the article makes me want to hurl as usual. And I'll stop short of an accusation but I will say there were some suspicious em dash comparison clauses in there.
you have `observedAttributes` and a callback to react whenever they change. That is basically it.
Do you still have to pass every args as json/strings or has there been an improvement on that front?
> they don't provide reactivity; you have to write that yourself. Reactivity was the feature that launched modern js frameworks so I think the article really overstates the case.
This is the truth that a lot of web component advocates gloss over on purpose. They know this, just like they know that there's no decent templating solution either as tagged template literals still need escaping. Then there is efficient DOM updates, etc. (aside, I got Claude to write a web component recently, and it's code had every single keystroke assigning the same class to the element)
There are many features like this, and when you finally get them to admit it, they just say "write your own"!. Well guess what, frameworks already provide all of this.
The really funny part is that Stencil, one of the popular tools for writing web components actually does provide all of the above! Their web components have exactly the same type of features you'd expect in any other framework *because it IS a framework*.
Which again highlights how stupid the discourse is here. It's not "independence" of frameworks, your components will still depend on a framework of some kind, be that Stencil or Lit or whichever thing YouTube uses now or your own supporting code to get back even half the features you get elsewhere.
It all starts to make sense when you realise that the Chrome developers hated frameworks because they didn't understand them, pushed for web components, not realising frameworks dealt with all of the above.
https://youtu.be/UrS61kn4gKI?t=1921 32:00 (but the whole video is valuable and I wish everyone on both sides of this debate would watch the whole thing).
I think the only thing I like about web components is they scope "this" to the element it owns.
Yes. You can tell the author either doesn't have experience using web components in a non trivial page, or they are intentionally hiding the complexity. Realistically, you don't want to make pure web components. You want to use a framework to build it for you.
Put it another way, you can make a page out of web components without using a framework, but you are not going to convert a React page with that approach.