←back to thread

277 points merqurio | 1 comments | | HN request time: 0s | source
Show context
kubb ◴[] No.45113384[source]
For the frontend work that I did, Lit was a godsend. It really helps you build components and apps without getting in the way.

In comparison, Angular is a monster, and React is designed for the old browser capabilities, and is now staying around by inertia, not by inherent quality.

replies(3): >>45113627 #>>45113773 #>>45114105 #
pmg101 ◴[] No.45113627[source]
Which old browser capabilities are you referring to? Could you say more, or link to more details?
replies(1): >>45113746 #
kubb ◴[] No.45113746[source]
No shadow DOM, no web components, no template strings, etc.
replies(1): >>45114479 #
troupo ◴[] No.45114479[source]
> No shadow DOM

Funny you should say that when the current advise for web components is to avoid Shadow DOM (almost like the plague)

> no web components

As in?

> no template strings

Why would React need template strings? React is not the only framework that doesn't use template strings for anything (Vue, Solid, Svelte come immediately to mind). And it's hard to accuse those of being behind the times when Solid is literally the reason for the upcoming native signals proposal

replies(1): >>45116314 #
azangru ◴[] No.45116314[source]
> the current advise for web components is to avoid Shadow DOM (almost like the plague)

Could you provide the source for this advice?

replies(2): >>45117066 #>>45120262 #
1. troupo ◴[] No.45120262[source]
It may have actually started with Web Components Community Group report itself: https://w3c.github.io/webcomponents-cg/2022.html

--- start quote ---

It's worth noting that many of these pain points are directly related to Shadow DOM's encapsulation. While there are many benefits to some types of widely shared components to strong encapsulation, the friction of strong encapsulation has prevented most developers from adopting Shadow DOM, to the point of there being alternate proposals for style scoping that don't use Shadow DOM. We urge browser vendors to recognize these barriers and work to make Shadow DOM more usable by more developers.

--- end quote ---

And probably continued in HTML Web Components https://blog.jim-nielsen.com/2023/html-web-components/

A more technical and measured take on Shadow DOM is here: https://nolanlawson.com/2023/12/30/shadow-dom-and-the-proble...