News for hackers. Stuff that matters.
Re:Web Components Eliminate JavaScript Framework Lock-In by davetron5000 on Monday November 27, 2023 @01:20PM (#38435981)
Web Components are not a replacement for React. They are a thing you would use to build React if you were to do so today. To use only Web Components, you will be writing a lot of low-level code using the browser's API, or you will have to use a framework built on Web Components
Re:Web Components Eliminate JavaScript Framework Lock-In by troupo on Monday November 27, 2023 @03:34PM (#38437871)
> They are a thing you would use to build React if you were to do so today.

No, you wouldn't. Very few JS frameworks (however new they are) use web components as their foundation for many, many, many reasons.

Re:Web Components Eliminate JavaScript Framework Lock-In by gitaarik on Tuesday November 28, 2023 @10:32AM (#38446747)
For me it's a perfect replacement for React. I've been using it for years, and I'm much more happy about it than React. And I was already very happy with React compared to before that. I think it's the logical next step, but you need to unlearn some React concepts and relearn some Web Component concepts before you are really comfortable with it. But when you know how to work with it it's really super nice, and you'll appreciate better understanding the powerful browser and DOM APIs.