6 ms·
That is cool, didn't realize that! I wonder why React lags behind ( ? )
by asurty 4y ago
That is cool, didn't realize that! I wonder why React lags behind ( ? )
- pjmlp 4y agoI think it is a culture issue, as far as I understand the underlying issue, the React community is not so impressed with having to deal with Web Components.
- dmitriid 4y agoRealistically, there's almost no community that is impressed with having to deal with Web Components. In this discussion I keep reiterating: there are multiple reasons why none of the major frameworks and very few of the new frameworks have WCs as their foundation. At best they can consume/embed them and perhaps compile to them. And even that is rife with problems.
- pjmlp 4y agoIf we ignore the fact that everyone else supports them, regardless if they are their foundation or not. https://custom-elements-everywhere.com/ https://custom-elements-everywhere.com/
- dmitriid 4y ago> everyone else supports them That's what I said: At best they can consume/embed them and perhaps compile to them. > regardless if they are their foundation or not. And the fact that they are not forming the foundation of these frameworks should be examined and fixed, not ignnored. However, wc proponents ignore this entirely.
- pjmlp 4y agoMaybe because those frameworks don't want to be rewritten from scratch? It is like asking why so many graphics engines get written, instead of using raw OpenGL/Vulkan calls and extension spaghetti all over the place.
- dmitriid 4y ago> Maybe because those frameworks don't want to be rewritten from scratch? The absolute vast majority of new frameworks don't use web components as the foundation. Perhaps instead of burying their heads in the sand people pushing web components would should finally start asking why?
- pjmlp 4y agoUsually I use https://angular.io/guide/elements https://angular.io/guide/elements, https://vuejs.org/guide/extras/web-components.html#using-custom-elements-in-vue https://vuejs.org/guide/extras/web-components.html#using-cus... or https://lit.dev/ https://lit.dev/ I only need to ask why, when I have to deal with React based stuff.
- dmitriid 4y agoAngularJS doesn't use web components as their foundation. VueJS doesn't use web components as their foundation. So you're not asking why. You're ignoring the question and burying your head in the sand.
- pjmlp 4y agoYeah, because yelling against Web Components in every forum thread is so much more productive. We use them with the frameworks that have first class support, regardless if they are at their foundation or not. Who is actually being ignored here?
- dmitriid 4y ago> Yeah, because yelling against Web Components in every forum thread is so much more productive. I'm not yelling. I'm pointing out facts. > regardless if they are at their foundation or not. So why are they not used as a foundation? Why are they used at best as a second class citizen? Why is it these frameworks don't produce web components by default? > Who is actually being ignored here? Framework authors, who have been pointing out the very many deficiencies and shortcomings for years. Most developers who need things like scoped CSS and open-ui.org more than fifteen hundred new standards, each requiring JS to work, barely.
- asurty 4y agoWeb components seem like a good idea to me. I would imagine there are a lot of libraries out there (eg/ calendars, styling frameworks) that would benefit from reuse across applications. The browser could cache it even if served from a different CDN. I'm curious what the problems are with web components that you see? Is it specifically related to how they might be used (or useless) in the major frameworks?
- dmitriid 4y ago> I'm curious what the problems are with web components that you see? Bitesized explanation from Rich Harris, the author of Svelte: https://twitter.com/Rich_Harris/status/1198332398561353728 https://twitter.com/Rich_Harris/status/1198332398561353728 It's from 2019, but all the issues are still there. When/If they are going to be solved, it will be by increasingly complex standards that require more and more Javascript for them to just barely function (like they couldn't even participate in form events without additional Javascript). See also a larger discussion by the author of Solid: https://youtu.be/BEWkLXU1Wlc?t=5837 https://youtu.be/BEWkLXU1Wlc?t=5837 (if the link doesn't open at the timestamp, skip to "Failed Promise of Web Components" at 1:37:17). It's a bit rambling because it was unrehearsed and on stream, but still good. He also shows and discusses other articles like Rich Harris' https://dev.to/richharris/why-i-don-t-use-web-components-2cia https://dev.to/richharris/why-i-don-t-use-web-components-2ci... and his own https://dev.to/ryansolid/maybe-web-components-are-not-the-future-hfh https://dev.to/ryansolid/maybe-web-components-are-not-the-fu... You can read them directly, but Ryan gives excellent additional context.
- asurty 4y agoThanks for taking the time to find/share these links! Very informative. It sounds to me like most of the criticism's outlined are solvable. Perhaps the people behind the standard should be engaging the framework community more. I wonder if you think web components (and the problem they set out to solve) is wrong from a fundamental/architectural standpoint?