Live data from Hacker News

The Case for Web Components: A Simpler, Framework-Free Future for the Web

blog.lnear.dev

11–20 of 23 posts

Re: The Case for Web Components: A Simpler, Framework-Free Future for the Web

#11
post #2

This seems to be a pretty low-effort post without any real substantive details. I'd much rather see discussion of the "Parallel Evolution of React and Web Components" article that got posted earlier today. I don't agree with that author's strong stance against React, but it's at least a well-written post with substantial thought and significant technical detail: - https://news.ycombinator.com/item?id=41790499 or thes…

It seems like it was written by ChatGPT.

How so?

Re: The Case for Web Components: A Simpler, Framework-Free Future for the Web

#12
post #9
post #2

This seems to be a pretty low-effort post without any real substantive details. I'd much rather see discussion of the "Parallel Evolution of React and Web Components" article that got posted earlier today. I don't agree with that author's strong stance against React, but it's at least a well-written post with substantial thought and significant technical detail: - https://news.ycombinator.com/item?id=41790499 or thes…

I must be missing something. Could you point me to the section(s) in any of those that make the same point I'm trying to? Or, how many more words do I need to use to say 'Web components don't force you to use Node and don't require a build step'?

Isn't that what people already know about webcomponents? So you'd need to instead write about why that matters?

Re: The Case for Web Components: A Simpler, Framework-Free Future for the Web

#13

Earlier quoted context omitted.

It seems like it was written by ChatGPT.

Here's my quick rebuttal, as someone who likes/uses parts of Web Components but knows it's no panacea. ChatGPT could improve on it I'm sure. > 1. No Need for Node.js: Keeping Development Simple You can have code that requires a server or build script with and without web components. You can have code that doesn't require those with and without web components. > 2. Native Browser Support: No Server-Side Rendering Head…

>You can have code that requires a server or build script with and without web components. You can have code that doesn't require those with and without web components.

Believe it or not, there are other server-side languages apart from node. Without Node, you can't SSR in any of those frameworks, so i don't know how that changes my point

>This is the point that makes the least sense. You can opt out of server-side rendering when using a non-WC framework, and you lose the headaches.

But you miss out on performance... without SSR you are bypassing the html parser and just abusing JS to manipulate the DOM.

> Duplicate of #1. smh

If you insist.

> The API doesn't provide a whole lot. That's why a lot of people are using Lit.

Oh no, a js library.

Your other points aren't even worth responding to.

Re: The Case for Web Components: A Simpler, Framework-Free Future for the Web

#14
The good thing about web components is you don't have to know or care about whatever trendy web framework they're implemented in internally; all that hot garbage is sealed away inside its own individual little ravioli that behaves like anything else in the DOM and can be manipulated with vanilla JS. Fans of various frameworks and methodologies will naturally fume and rant about this sort of "lowest common denominator" treatment, but in a few years the same people may well thank their lucky stars that their new webapps and new shiny frameworks aren't permanently welded to a now distinctly un-trendy implementation strategy hidden within web components they're still using. It's ultimately a feature for protecting the future of the browser from the fads of the present.

Re: The Case for Web Components: A Simpler, Framework-Free Future for the Web

#15
post #9

Earlier quoted context omitted.

I must be missing something. Could you point me to the section(s) in any of those that make the same point I'm trying to? Or, how many more words do I need to use to say 'Web components don't force you to use Node and don't require a build step'?

Isn't that what people already know about webcomponents? So you'd need to instead write about why that matters?

You can't look up web components on MDN? And if not why it matters, what's my article saying?

Re: The Case for Web Components: A Simpler, Framework-Free Future for the Web

#16
post #11

Earlier quoted context omitted.

It seems like it was written by ChatGPT.

How so?

Was it? I confess that I initially downvoted them on principle but came back to remove the downvote after reading the article because it did have strong LLM vibes.

There were lots of turns of phrase that didn't feel natural in a technical blog post but are common in ChatGPT's prose. But honestly the bigger red flag for me was the listicle format, with a numbered 6-point outline fleshed out with a few paragraphs per heading and no transitions or relationships of any kind between sections. It felt like something written in chunks and stitched together afterward, which is a common artifact of a ChatGPT workflow (since it produces small chunks of text at a time rather than whole coherent essays).

Re: The Case for Web Components: A Simpler, Framework-Free Future for the Web

#17
post #13

Earlier quoted context omitted.

Here's my quick rebuttal, as someone who likes/uses parts of Web Components but knows it's no panacea. ChatGPT could improve on it I'm sure. > 1. No Need for Node.js: Keeping Development Simple You can have code that requires a server or build script with and without web components. You can have code that doesn't require those with and without web components. > 2. Native Browser Support: No Server-Side Rendering Head…

>You can have code that requires a server or build script with and without web components. You can have code that doesn't require those with and without web components. Believe it or not, there are other server-side languages apart from node. Without Node, you can't SSR in any of those frameworks, so i don't know how that changes my point >This is the point that makes the least sense. You can opt out of server-side r…

Ah, I see the point about SSR. Yes, frameworks like React and Vue make it less obvious how to do non-framework SSR. However, they don't make it impossible. You can have React and Vue render on an individual element and not the whole document. The HTMLElement part of web components are actually a decent way to do that. You can make a thin wrapper HTMLElement that runs createRoot. https://react.dev/reference/react-dom/client/createRoot

Re: The Case for Web Components: A Simpler, Framework-Free Future for the Web

#18
post #11

Earlier quoted context omitted.

How so?

Was it? I confess that I initially downvoted them on principle but came back to remove the downvote after reading the article because it did have strong LLM vibes. There were lots of turns of phrase that didn't feel natural in a technical blog post but are common in ChatGPT's prose. But honestly the bigger red flag for me was the listicle format, with a numbered 6-point outline fleshed out with a few paragraphs per h…

It wasn't and I'm not particularly fond of LLMs, that's just how i write.

Re: The Case for Web Components: A Simpler, Framework-Free Future for the Web

#19
post #13

Earlier quoted context omitted.

>You can have code that requires a server or build script with and without web components. You can have code that doesn't require those with and without web components. Believe it or not, there are other server-side languages apart from node. Without Node, you can't SSR in any of those frameworks, so i don't know how that changes my point >This is the point that makes the least sense. You can opt out of server-side r…

Ah, I see the point about SSR. Yes, frameworks like React and Vue make it less obvious how to do non-framework SSR. However, they don't make it impossible. You can have React and Vue render on an individual element and not the whole document. The HTMLElement part of web components are actually a decent way to do that. You can make a thin wrapper HTMLElement that runs createRoot. https://react.dev/reference/react-dom/…

Do you know what SSR is?

Re: The Case for Web Components: A Simpler, Framework-Free Future for the Web

#20
post #6

Been hearing the case for web components for a very long time. Are there any implemented well? Last I looked at shoelace/web awesome, using a single component brought in 40k+ of JS

We use them pretty frequently and are even working on releasing our own web component library. I wouldn't recommend using it yet, it needs to be documented better, but here it is if you want to check it out. https://github.com/outerbase/astra-ui

Just checked it out. The example in your readme doesn't work (script src is wrong). Also, it loads 250k of JS for a single button :(
Post reply on HN