Live data from Hacker News

The Failed Promise of Web Components

lea.verou.me

231–235 of 235 posts

Re: The Failed Promise of Web Components

#231

Earlier quoted context omitted.

Thanks for the link. This library unfortunately highlights further challenges with Web Components like mixing custom WCs with native form elements. To use Shoelace form elements at all, you'll end up writing a bunch of JavaScript. > Shoelace forms don't make use of action and method attributes and they don't submit the same was as native forms. To handle submission, you need to listen for the slSubmit event as shown…

> To use Shoelace form elements at all, you'll end up writing a bunch of JavaScript. Shoelace author here. This is somewhat true (I wouldn’t call it “a bunch” though), and it will be until form-associated custom elements are standard. However, I’d argue that most form validation and submission is done with JavaScript these days. I can’t think of the last time I saw a post request submitted from a form in the wild. (N…

Thanks for the reply! Shoelace does look great, and I recognize doing the form submission this way is a requirement currently. Hopefully the links above about allowing custom WebComponents to act as native form elements will further enable Shoelace.

Re: The Failed Promise of Web Components

#232

I love her description of using a dependency-laden component: > Using a custom element from the directory often needs to be preceded by a ritual of npm flugelhorn, import clownshoes, build quux, all completely unapologetically because “here is my truckload of dependencies, yeah, what”. Many steps are even omitted, likely because they are “obvious”. Often, you wade through the maze only to find the component doesn’t w…

> BTW: This lady has a Masters from MIT. She def knows her way around things. I agree with all of what you said until you bought up this unnecessary credential wrapper. It leaves a bad taste - statements like this. I don't know why. Going to MIT is doesn't make you an automatic genius nor does it mean that they know their way around things. It bothers me.

Probably a more relevant fact is she's on the CSS Working Group, meaning she has a voice on the CSS spec.[0] She has an important and influential voice in this space. Lea Verou is an expert on frontend and has been for years. I have her book and really enjoy it, it's like a coffee table CSS book with gorgeous pictures and mindbending techniques.

https://en.wikipedia.org/wiki/Lea_Verou

Re: The Failed Promise of Web Components

#234
post #4

It would have helped a lot if JS had a working modules systems on the web. > What hope do those who can’t write JS have? Using a custom element from the directory often needs to be preceded by a ritual of npm flugelhorn, import clownshoes, build quux, all completely unapologetically because “here is my truckload of dependencies, yeah, what”. JS has been in a dark & ugly spot, & WebComponents feeling janky & weird is…

Hey, nice article on Declarative Shadow DOM today (that's what i meant but said wrong, on Declarative Custom Elements),

https://web.dev/declarative-shadow-dom/

To an improving enhancing JS & Web!!! Hopefully we get HTML Modules too, & together we can make far far far far more WebComponents in the DOM, & need much less JS!

Re: The Failed Promise of Web Components

#235

Earlier quoted context omitted.

Could you give a few examples of those languages and frameworks just to understand what you are comparing React to?

Here’s a decent list through time for JavaScript frameworks: http://todomvc.com/ For my own experience with things that were specifically MVC or MVVM: In C#: Asp.net MVC, WPF (with/without Prism) In Typescript: Knockout, Angular 2.0+ (I guess it wasn’t mvc really - I disliked it for other reasons) React (with hooks) on the other hand is the embodiment of a pure Functional Programming UI. I can literally write a compo…

Thanks, that helps.
Post reply on HN