Ask HN: Is 2022 the year of web components? [front end web dev]

3 points by okareaman ↗ HN
I've been out of the loop for awhile, but back in 2017 I was a big fan of Polymer by Google (web components utilizing shadow DOM.) At the time there was a feeling you didn't need frameworks if you had components you could use like html tags.

In 2021 I got back into it:

I took a look at Blazor. Ok, that's just web components, where the file name is the component name.

I took a look at Svelte. Ok, that just web components with reactivity. Svelte looks like the inspiration for Blazor.

I took a look at Angular. They have components now or did they always have components?

I took a look at React. Look, they're starting to use Polymer type components inside React components.

I took a look at web components, not longer called Polymer it seems, and wow, they've made a lot of progress. Salesforce.com is a big user (a company I respect for their tech) and Google itself is a big user. Google says Web Components are everywhere and I'm using them a lot without knowing it.

So have Shadow DOM components arrived?

https://developer.mozilla.org/en-US/docs/Web/Web_Components

4 comments

[ 3.7 ms ] story [ 20.8 ms ] thread
I don't actively follow web components, but as someone who follows the React space reasonably well, I don't get any sense that things are shifting towards web components (at least in the sense of replacing React). React's docs[1] argue that they solve different problems (obviously that's potentially biased, but I still find it reasonably compelling). I think the most likely outcome is that some things will be shipped as web component libraries that can be easily consumed within various frameworks (e.g., I could envision Stripe shipping a webcomponent library instead of a React specific library).

[1] https://reactjs.org/docs/web-components.html

This makes sense. I really like the idea of non-framework specific components so that's the route I'll take. I'm happy that option is growing in viability. Thanks.
Web Components will not replace frameworks, but enhance them. It doesn't matter which framework you use (current ones like Angular, React or Vue) or some future framework, web components work in ALL of them. They are currently supported by all modern browsers, and about IE11 its time to let go of that one.
2017 to 2022, that is 5 years. But its 4 companies (Apple, Google, Microsoft & Mozilla) that all need to agree in setting this Web Components standard. So it can feel like slow progress. But.. once a standard, it will will last for another 27 JavaScript years. And anyone who has been in this "Internet" business for that long can tell you how valuable that is. Remember IE once had 90% market share.. guess how much market share Facebook will have in N years time. PS. The WHATWG is by invitation only, and we all wonder if those 4 companies will invite Facebook.

It is NOT about Technology, it is about Who creates Technology.