DEV Community

loading...

Discussion on: Why I don't use web components

Collapse
richharris profile image
Rich Harris Author

That's where web components potentially make sense (along with design systems). I haven't encountered such a situation yet, but in theory I'm all for it.

With a caveat, that is: it has to have been hand-coded, or built with a framework that produces very small bundles for standalone components (like Svelte!). If it was built with, say, lit-element, then it's a non-starter for distribution since it has a >20kb runtime dependency.

Collapse
webreflection profile image
Andrea Giammarchi

would just 5.3K work? That's HyperHTMLElement size in CDN.

It has various handy helpers so it makes components creation more compact.

If not, does it make sense to complain about verbosity of Custom Elements and then also not accept any helper to simplify them?