3 ms·
That tweet is 3 years old. Web Components weren't ready for prime time a few years ago. Google has the Lit framework is using it in Angular. Web Components are
by michaelwww 4y ago
That tweet is 3 years old. Web Components weren't ready for prime time a few years ago. Google has the Lit framework is using it in Angular. Web Components are here to stay. I'd like to know what Rich Harris thinks about Web Components today. Microsoft just released their Web Component frame work:
The adaptive interface system for modern web experiences. Interfaces built with FAST adapt to your design system and can be used with any modern UI Framework by leveraging industry standard Web Components. Standards-based Web Components are the foundation of each FAST component, making them compatible with almost any modern web framework, including those listed below.
https://www.fast.design/ https://www.fast.design/
- dmitriid 4y ago> That tweet is 3 years old. Web Components weren't ready for prime time a few years ago. So. Have they solved any of the issues listed? > Google has the Lit framework is using it in Angular. You've missed a few words in there. yes, Google has Lit. And yes, Angular can be twisted to use them (but doesn't use them by default). > Web Components are here to stay. I'd like to know what Rich Harris thinks about Web Components today. Literally nothing you wrote answers my question. And the answer is: no, despite the tweet being 3 years old and web components "not being ready for prime time then", none of those issues have been solved in the three years since. --- Edit. As to what Rich Harris thinks about them now? https://twitter.com/Rich_Harris/status/1518912939876618242 https://twitter.com/Rich_Harris/status/1518912939876618242 They're the past. Specifically, they took our best ideas circa 2010 and ossified them into the platform https://twitter.com/Rich_Harris/status/1513638143584518154 https://twitter.com/Rich_Harris/status/1513638143584518154 I don't see any evidence of [fameworks will be transpilers to native web components in the next 5 years]. if anything, i think we'll see frameworks begin to explore the notion that 'component' is a purely author-time concept etc.
- michaelwww 4y agoNot only is Rich Harris is a fast talker, he expresses more strong opinions per minute than most, except perhaps Richard Feldman about Elm. I like Harris' passion. He believes his way is the best. More power to him, but I'm not going to argue with you after coming across this quote recently: Too much gaslighting from a parent as a child turns you into an argumentative person desperate to prove your version of event's because you're used to being dismissed in an unfair power structure (tinybuddha.com) I will say I've been building Web Components lately and think they are elegant and beautiful and solve some problems in a neat way, but of course don't solve all problems. Also this: Angular elements are Angular components packaged as custom elements (also called Web Components), a web standard for defining new HTML elements in a framework-agnostic way. https://angular.io/guide/elements https://angular.io/guide/elements
- dmitriid 4y agoIt's funny how you keep ignoring the original question and trying to talk your way out of it. So. Have web components solved any of the problems listed? Yes. Or no. No buddha quotes.
- michaelwww 4y agoWhat I hear you saying is you want me to do research for you. Ok, I'll bite, I'm retired with nothing better to do. The Guide to Accessible Web Components https://www.erikkroes.nl/blog/accessibility/the-guide-to-accessible-web-components-draft/ https://www.erikkroes.nl/blog/accessibility/the-guide-to-acc... Server Side Render Web Components: It's a common myth that you can't server side render Web Components. https://dev.to/steveblue/server-side-rendering-web-components-320g https://dev.to/steveblue/server-side-rendering-web-component... Using SVGs in Lightning Web Components https://developer.salesforce.com/blogs/2020/07/using-svgs-in-lightning-web-components https://developer.salesforce.com/blogs/2020/07/using-svgs-in... There are various work around for global namespace problems You're welcome
- dmitriid 4y ago> What I hear you saying is you want me to do research for you. What you hear is me asking a direct question and expecting a direct answer. All I hear in response is non-answers. > to do research for you. I wish it were research and not a couple of links you just grabbed from a quick Google search. > The Guide to Accessible Web Components Translation: the problem is not solved because Shadow DOM isn't accessible. Relevant quotes: """ Building proper UI Web Components can be quite a task though, especially if you want them to be accessible. As the shadow DOM is completely encapsulated and isolated, it is also completely disconnected. It's almost like it's a completely different document like an iframe. When one of both (the label or the input) is in the shadow DOM, they're in a completely different context. This makes it impossible to refer to eachother. This same dillema also goes for WAI-ARIA attributes like aria-labelledby, aria-describedby and other that reference an ID. You need either both elements in the shadow DOM, or both of them in the light DOM. """ I'll let you do the research further. The only "solution" on the horizon is manually adding more boilerplate Javascript to your components when Acessibility Object Model becomes available in the browser. > Server Side Render Web Components: It's a common myth that you can't server side render Web Components. It's not a myth. It's pure reality. Which you'd know about if you bothered to read the links you provide. The link even states this clearly: you can't render them. You have to use a very specific set of third-party tools that jump through hoops to provide the DOM object on the server. This is not a generic solution provided by the platform, you have to buy in to specific frameworks for this to work. > Using SVGs in Lightning Web Components And here we see that you didn't even understand the question. No one said you couldn't render SVG from custom components. However, you cannot do this: <svg> <x-axis min="2000" max="2019"/> <y-axis min="0" max="100"/> <scatter-plot points="..."/> </svg> because custom elements are HTML by definition (they extend HTMLElement). Totally incompatible with SVG. You'd know that if you had done actual research, and not spent your time attacking Rich Harris, or gushing how Google invests oney in some framework.