Creator of a popular web component library here. Some observations:
> one of them is already deprecated, and v0 of another one is also already deprecated.
Sometimes you swing and you miss. Instead of moving forward with the initial design, they iterated and improved it. That’s how software works.
> The API is so bad, that the official stance is "the API is aimed at library and framework developers, and you are not expected to write your components using this API".
It’s not because the API is bad, it’s because the term “component” has become ubiquitous with framework components and that’s caused A lot of confusion. Web components are lower level than React/Vue components by design, but people hear “component” and have the same expectations. Having worked with web components almost exclusively for more than a year, I feel like the APIs are thought out fairly well. They’re not perfect, but they are good and there’s momentum to continue improving them (e.g. declarative shadow DOMs).
> You cannot extend some (most?) of the built-in components. And even if you can, your custom implementations will not participate in form events
It’s still pretty new, but it’s coming. These things take time to get right and become supported by all browsers. Search for form-associated custom elements, for example.
> They break accessibility
Only if misused, which is also possible to do in any framework or even plain HTML.
> They don't work without JavaScript
I’m so tired of hearing this. How well does your React/Vue/Angular/Alpine/jQuery-based app work without JavaScript?
Browsing the web in 2020 with JavaScript disabled is like driving your car down the road without any wheels. Things just aren’t going to work right. The experience will be inferior even the when effort is made, but IMO it’s not reasonable to expect developers to accommodate the < 1% of users who might actually do this.
> They cannot be rendered server-side
I’m no expert in SSR, but Stencil offers some examples of how to achieve this with their compiler, which is a joy to use. [1]
> They are not strictly HTML, but a subset of it, because you can't provide callbacks for their custom events
It wouldn’t make sense to provide an “onclick” style prop for custom events, but you can attach listeners with `addEventListener` like any other event. The syntax is identical.
> And on the social side of things, their proponents will very rarely acknowledge or discuss these issues in public
I’m a proponent and I’m happy to discuss these things in public.
It seems, however, there are a lot of misconceptions about the underlying specs. Maybe that’s deserved — it took a long time for web components to get this far and it’s been a bumpy road. That doesn’t mean it hasn’t gotten much better.
I’d encourage anyone who hasn’t explored custom elements, shadow DOM, et al recently to take another look. We’re building some awesome things with them!
1. https://stenciljs.com/docs/static-site-generation