Hacker News new | ask | show | jobs
by asurty 1248 days ago
Web components seem like a good idea to me. I would imagine there are a lot of libraries out there (eg/ calendars, styling frameworks) that would benefit from reuse across applications. The browser could cache it even if served from a different CDN.

I'm curious what the problems are with web components that you see? Is it specifically related to how they might be used (or useless) in the major frameworks?

1 comments

> I'm curious what the problems are with web components that you see?

Bitesized explanation from Rich Harris, the author of Svelte: https://twitter.com/Rich_Harris/status/1198332398561353728 It's from 2019, but all the issues are still there. When/If they are going to be solved, it will be by increasingly complex standards that require more and more Javascript for them to just barely function (like they couldn't even participate in form events without additional Javascript).

See also a larger discussion by the author of Solid: https://youtu.be/BEWkLXU1Wlc?t=5837 (if the link doesn't open at the timestamp, skip to "Failed Promise of Web Components" at 1:37:17). It's a bit rambling because it was unrehearsed and on stream, but still good. He also shows and discusses other articles like Rich Harris' https://dev.to/richharris/why-i-don-t-use-web-components-2ci... and his own https://dev.to/ryansolid/maybe-web-components-are-not-the-fu... You can read them directly, but Ryan gives excellent additional context.

Thanks for taking the time to find/share these links! Very informative.

It sounds to me like most of the criticism's outlined are solvable. Perhaps the people behind the standard should be engaging the framework community more.

I wonder if you think web components (and the problem they set out to solve) is wrong from a fundamental/architectural standpoint?