4 ms·
> Web components were supposed to make it easier to share components between frameworks. But from what I can tell, this never fully materialized because the too
by azangru 3y ago
> Web components were supposed to make it easier to share components between frameworks. But from what I can tell, this never fully materialized because the tools provided by web components are insufficient and people end up having to import additional libraries.
Web components do make it possible to share components between projects. See, e.g. Nordhealth, whose design system are build as web components with Lit, but whose big framework is Nuxt.
> Despite web components being around, most developers continue on with React and friends.
Most developers are taught React when they start; and do not learn the web platform properly.
- TheAceOfHearts 3y agoI remember a big selling point for web components was that it wouldn't matter which framework you were using because they would just give you a common interface. But this isn't that useful if you still have to import some giant framework as a dependency, maybe the main exception to this is something like Svelte. The claim certainly feels like it has been downsized over time. If I'm already using the same framework between projects I can share components without web components. It just feels like a bait and switch when platform developers continue claiming things which never fully materialize. Maybe part of the blame goes to me as the reader for making assumptions. I've read through the HTML spec and try to keep up with web platform updates. That doesn't change the fact that React and friends _is_ the de facto web platform for tons of developers.
- azangru 3y ago> But this isn't that useful if you still have to import some giant framework as a dependency I agree. And I don't believe that you have to import a giant framework either. Web components today, especially with a bit of extra convenience that comes, for example, from Lit, are now where React was around 2015, before all the big frameworks came about, and before React changed its api from the one based on component's life cycle to the one based on data dependencies.