Live data from Hacker News

HTML with Superpowers: An Introduction to Web Components

htmlwithsuperpowers.netlify.app

121–130 of 130 posts

Re: HTML with Superpowers: An Introduction to Web Components

#121

Earlier quoted context omitted.

> A UI library for React, Vue, Svelte, Solid, whatever... Imagine being able to have a component library that works with any of them (or none of them). That seems to be a worthy goal, but I don't see that being usable in prod projects, at least not in the near future. The closest I've seen is something like PrimeFaces, which has components for Angular, React and Vue, which is the majority of projects I've seen out th…

Still the same issue though. What about Svelte? What about solid? What about mithril? I know this might seem like a "who cares" sort of thing since the industry has standardized on the three listed, but I find all three overkill for a lot of things and, for example, keep my small projects in Mithril. But then I'm hit with either using Construct UI (which is honestly ok, this is all internal stuff), or having to make…

> I know this might seem like a "who cares" sort of thing since the industry has standardized on the three listed

It is that sort of thing and it breaks my heart that this is the case.

And yet, supporting solutions that would work with any front end solution and do so well without death by committee is some ways off, if not outright impossible.

It's very much the same way how I love Firefox but when >95% of your userbase is on Chrome, you need to pay additional attention to testing and compatibility against it.

It's also very much how many of the SaaS solutions or even self-hostable tools and such might have integrations for most of the popular languages/frameworks/libraries out there, yet keep the niche ones unsupported due to a lack of market share.

So for now, I'll just take what I can get, in lieu of better options.

Re: HTML with Superpowers: An Introduction to Web Components

#122
post #120

Earlier quoted context omitted.

> Maybe because those frameworks don't want to be rewritten from scratch? The absolute vast majority of new frameworks don't use web components as the foundation. Perhaps instead of burying their heads in the sand people pushing web components would should finally start asking why?

Usually I use https://angular.io/guide/elements , https://vuejs.org/guide/extras/web-components.html#using-cus... or https://lit.dev/ I only need to ask why, when I have to deal with React based stuff.

AngularJS doesn't use web components as their foundation.

VueJS doesn't use web components as their foundation.

So you're not asking why. You're ignoring the question and burying your head in the sand.

Re: HTML with Superpowers: An Introduction to Web Components

#123
post #120

Earlier quoted context omitted.

Usually I use https://angular.io/guide/elements , https://vuejs.org/guide/extras/web-components.html#using-cus... or https://lit.dev/ I only need to ask why, when I have to deal with React based stuff.

AngularJS doesn't use web components as their foundation. VueJS doesn't use web components as their foundation. So you're not asking why. You're ignoring the question and burying your head in the sand.

Yeah, because yelling against Web Components in every forum thread is so much more productive.

We use them with the frameworks that have first class support, regardless if they are at their foundation or not.

Who is actually being ignored here?

Re: HTML with Superpowers: An Introduction to Web Components

#124
post #123

Earlier quoted context omitted.

AngularJS doesn't use web components as their foundation. VueJS doesn't use web components as their foundation. So you're not asking why. You're ignoring the question and burying your head in the sand.

Yeah, because yelling against Web Components in every forum thread is so much more productive. We use them with the frameworks that have first class support, regardless if they are at their foundation or not. Who is actually being ignored here?

> Yeah, because yelling against Web Components in every forum thread is so much more productive.

I'm not yelling. I'm pointing out facts.

> regardless if they are at their foundation or not.

So why are they not used as a foundation? Why are they used at best as a second class citizen? Why is it these frameworks don't produce web components by default?

> Who is actually being ignored here?

Framework authors, who have been pointing out the very many deficiencies and shortcomings for years. Most developers who need things like scoped CSS and open-ui.org more than fifteen hundred new standards, each requiring JS to work, barely.

Re: HTML with Superpowers: An Introduction to Web Components

#125
post #123

Earlier quoted context omitted.

Yeah, because yelling against Web Components in every forum thread is so much more productive. We use them with the frameworks that have first class support, regardless if they are at their foundation or not. Who is actually being ignored here?

> Yeah, because yelling against Web Components in every forum thread is so much more productive. I'm not yelling. I'm pointing out facts. > regardless if they are at their foundation or not. So why are they not used as a foundation? Why are they used at best as a second class citizen? Why is it these frameworks don't produce web components by default? > Who is actually being ignored here? Framework authors, who have…

I only see React framework authors ignoring Web Components.

Angular and Vue framework authors considered them good enough to spend development resources on adding support for Web Components, they didn't do it for fun and glory.

Re: HTML with Superpowers: An Introduction to Web Components

#126
post #125

Earlier quoted context omitted.

> Yeah, because yelling against Web Components in every forum thread is so much more productive. I'm not yelling. I'm pointing out facts. > regardless if they are at their foundation or not. So why are they not used as a foundation? Why are they used at best as a second class citizen? Why is it these frameworks don't produce web components by default? > Who is actually being ignored here? Framework authors, who have…

I only see React framework authors ignoring Web Components. Angular and Vue framework authors considered them good enough to spend development resources on adding support for Web Components, they didn't do it for fun and glory.

> I only see React framework authors ignoring Web Components.

See how you ignore everything I write even though I wrote it in the very first reply: "there are multiple reasons why none of the major frameworks and very few of the new frameworks have WCs as their foundation. At best they can consume/embed them and perhaps compile to them."

All you keep saying is "oh they support web components only react doesn't support that's the only question why"

Full on denial and ignorance.

Angular's "support", for example, is slapping on a wrapper, and ignoring everything about web components entirely by loading the angular runtime and everything else Angular behind the wrapper. But sure. Support.

Re: HTML with Superpowers: An Introduction to Web Components

#127
post #125

Earlier quoted context omitted.

I only see React framework authors ignoring Web Components. Angular and Vue framework authors considered them good enough to spend development resources on adding support for Web Components, they didn't do it for fun and glory.

> I only see React framework authors ignoring Web Components. See how you ignore everything I write even though I wrote it in the very first reply: "there are multiple reasons why none of the major frameworks and very few of the new frameworks have WCs as their foundation. At best they can consume/embed them and perhaps compile to them. " All you keep saying is "oh they support web components only react doesn't suppo…

Goes hand in hand with you ignoring that except for React, everyone else supports Web Components in some form, so that you can keep bashing them.

We are done here, it is quite clear were we stand.

Re: HTML with Superpowers: An Introduction to Web Components

#128

Earlier quoted context omitted.

Yeah, I don't see Shadow DOM often, but there are couple sites I use that employ it - most notably Gerrit . Since I use it almost every work day, I wanted to fix a bunch of UX annoyances it has. Those fixes would've normally been trivial, but Gerrit UI has everything wrapped in multiple levels of Shadow DOM, making those fixes near-impossible instead to do in Stylus alone.

Some combination of Tampermonkey, MutationObserver and IntersectionObserver almost always gets there in the end, but despite having a default user script template with this exact skeleton it's a lot more of a pain in the arse to achieve what a simple CSS selector and some properties does in a few lines...

Exactly. And for me, that difference in PITA is the difference between fixing up websites in Stylus incrementally, spending a couple minutes for a CSS rule or three when something annoys me, vs. making a note on my TODO list to write the necessary code later, and never getting around to doing it.

Re: HTML with Superpowers: An Introduction to Web Components

#129
post #127

Earlier quoted context omitted.

> I only see React framework authors ignoring Web Components. See how you ignore everything I write even though I wrote it in the very first reply: "there are multiple reasons why none of the major frameworks and very few of the new frameworks have WCs as their foundation. At best they can consume/embed them and perhaps compile to them. " All you keep saying is "oh they support web components only react doesn't suppo…

Goes hand in hand with you ignoring that except for React, everyone else supports Web Components in some form, so that you can keep bashing them. We are done here, it is quite clear were we stand.

See how you're completely blind to what I'm writing.

My very first comment says this:

- There are multiple reasons why none of the major frameworks and very few of the new frameworks have WCs as their foundation.

This is a fact

- At best they can consume/embed them and perhaps compile to them.

This is also a fact

Somehow you saw me saying "React" in there. Which says a lot about you.

> We are done here, it is quite clear were we stand.

Oh yes, it's crystal clear.

Re: HTML with Superpowers: An Introduction to Web Components

#130
post #106

Earlier quoted context omitted.

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?

> 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…

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?

Post reply on HN