News for hackers. Stuff that matters.
Re:Web Components Are Okay by stavros on Sunday September 29, 2024 @09:22AM (#41687213)
Why aren't web components there/more popular yet? They seem like a fantastic solution
Re:Web Components Are Okay by burcs on Sunday September 29, 2024 @09:38AM (#41687325)
The cynic in me wants to say it’s because they aren’t VC backed so there’s no main catalyst driving them.

I don’t think a lot of people know about them, or if they do they have just heard about it in passing and have never actually used them.

Whatever the reason is they have a marketing problem that’s for sure.

Re:Web Components Are Okay by stavros on Sunday September 29, 2024 @10:07AM (#41687516)
Ah, well that's encouraging, if the tech itself is good, it means I can start using them more.
Re:Web Components Are Okay by j45 on Sunday September 29, 2024 @09:38AM (#41687333)
New developers follow social proof often instead of learning from first principles.

Web Components are seriously cool and worth looking at.

Re:Web Components Are Okay by evilduck on Sunday September 29, 2024 @12:00PM (#41688240)
Social proof does tend to follow employment opportunities. If you're a new dev you don't have the luxury to make principled choices in technology, you're more worried about housing and food security and maybe paying back student loans. Asking new developers to trend-set the industry would be deeply unfair. If we want them to learn from first principles then entry level jobs should have first principles opportunities available.
Re:Web Components Are Okay by j45 on Sunday September 29, 2024 @12:59PM (#41688646)
I meant social proof like prejudice against technologies that employ but don’t seem popular and cool.

Another confusion might be expecting an employer to educate you. That’s part of it but not the requirement.

Self-directed learning is critical to go with any formal learning.

First principles are needing to be taught where or before people are learning things like react. But they don’t, and get pulled into a world of complexity.

Re:Web Components Are Okay by stavros on Sunday September 29, 2024 @10:07AM (#41687517)
Excellent, thank you!
Re:Web Components Are Okay by pfraze on Sunday September 29, 2024 @12:49PM (#41688576)
Web Components have some nice features, some bad features, and no killer feature. Developers have mostly chosen to ignore them for other approaches (React, Vue) where there are better ergonomics and stronger network effects.
Re:Web Components Are Okay by meiraleal on Sunday September 29, 2024 @02:36PM (#41689385)
ShadowDOM should be a killer feature for people that wants to make web scrappers life a bit more difficult.
Re:Web Components Are Okay by nsonha on Sunday September 29, 2024 @02:48PM (#41689478)
just do a quick scan in this thread, many say it's the one thing that makes web components not work for them. It's the opposite of what a killer feature means
Re:Web Components Are Okay by meiraleal on Sunday September 29, 2024 @03:09PM (#41689605)
What users/devs like and what CEO/PMs want (stop bot scrapping) are different things.

It was a joke tho, I use custom elements heavily but never with ShadowDOM. It is indeed a PITA.

Re:Web Components Are Okay by kansface on Sunday September 29, 2024 @02:04PM (#41689148)
> They seem like a fantastic solution

for which problem? They don't replace the need for a framework nor do they make writing in one easier. They don't make dev ex better. What is the actual use case? If they were highly useful, they would be used.

Re:Web Components Are Okay by stavros on Sunday September 29, 2024 @02:08PM (#41689167)
Creating self-contained components that don't rely on loading extra management code, in a standard way.

Maybe they aren't useful because the modern trend of web development is to not care about speed or size as much.

Re:Web Components Are Okay by remixff2400 on Monday September 30, 2024 @10:48AM (#41697777)
Implementation has been a big part https://news.ycombinator.com/item?id=36976670 (one of many discussions if you search for previous Hacker News articles)

Especially earlier on, web components were implemented without incorporating some of the major feedback from developers. What resulted was a low-level tool with some really awkward warts and APIs that was more-or-less unusable. (hence, one of the reasons why when web components discussions come up, lit is always mentioned since it needs that extra layer to paper over some of the warts)

TL;DR: it replaces some of the bad parts of Angular/React/etc. with its own set of bad parts that become more obvious only once you get deeper in.