|
|
|
Ask HN: Using Web Components in 2022?
|
|
9 points
by wizzzzzy
1502 days ago
|
|
I'm starting a new client project which more or less boils down to a typical brochure website. For the last few years however I've mostly worked on React SPAs.
During this time I've really enjoyed the React component model and certain aspects of CSS in JS which I feel I'm going to miss when working on the new project.
As a result I've been doing some cursory exploration into web components (specifically Lit) as a means of replicating some of the benefits of React that I've grown accustom to but in a more 'traditional' environment.
I'm curious to know however if anyone has experience of Web Components / Lit and if this a valid option in 2022. |
|
But the browser native solution, "web components" proper, we have found do not have the same capabilities.
This conclusion comes from a team I lead that produces components for internal consumption by our product teams. We generate Angular and React components from our own DSL. When we considered creating web components we found they were limited in the manipulation of child content (in angular terms: projected content). There were numerous other nits that kept coming up that I don't remember.
It seems to me the web component idea itself is a zombie. This may be overstating the case because my perspective is about supporting hundreds of teams, but I sense it has no future.