4 ms·
Web components have their place but they're no panacea and the ecosystem is still pretty young. This is coming from someone that has been leading a decently lar
by misterbwong 4y ago
Web components have their place but they're no panacea and the ecosystem is still pretty young. This is coming from someone that has been leading a decently large StencilJS web component project for over a year now.
Documentation and Google-ability of the subject isn't great so prepare to some digging and experimentation.
The current native feature set is somewhat lacking so you're definitely going to want to augment with some sort of helper framework/library. Building any significantly sized project purely native with vanillaJS would be challenging.
There are also some unique hurdles with this type of project that our org had to work through-mainly on the integration and design side of it.
- Keithamus 4y agoI’ve been working on https://webcomponents.guide/ https://webcomponents.guide/ with some fellow experts in order to improve the documentation side of things. Hoping to offer guidelines and best practices to limit the amount of searching and experimentation required. Please take a look and provide feedback if you can!
- pjmlp 4y agoNo amount of documentation will help if React keeps acting as if Web Components don't exist. Other than that, the website looks quite nice.
- Keithamus 4y agoReact 19 is likely to ship with Web Components support. https://github.com/facebook/react/issues/11347 https://github.com/facebook/react/issues/11347
- dmitriid 4y agoThat marketing copy ugh. "New! Powerful!" It's neither "Standard JS so it works where HTML works" says a lot about your experts
- Keithamus 4y agoThanks for the feedback! If you have the time, I'd love for you to contribute and improve the marketing copy: https://github.com/WebComponentsGuide/webcomponents.guide https://github.com/WebComponentsGuide/webcomponents.guide
- dmitriid 4y ago> Web components have their place but they're no panacea and the ecosystem is still pretty young. And yet wc proponents keep pushing them as if they were panacea. And "ecosystems is young" is a funny statement for something that is entering its 12th year of development (and fifth year of wide availability in browsers). > The current native feature set is somewhat lacking so you're definitely going to want to augment with some sort of helper framework/library. If they are lacking, have glaring unsolved issues, https://twitter.com/Rich_Harris/status/1198332398561353728 https://twitter.com/Rich_Harris/status/1198332398561353728), and you still need to augment them with a framework/library,... what's the point then? If any of the existing solutions had the same amount of issues that wcs have, they would never have gotten of the ground. And yet here we are 12 years and hundreds of millions of dollars of effort later
- azangru 4y agoExamine html source of such sites as github, youtube, redhat, adobe — you will find web components either sprinkled there or being a principal building block. They are certainly a workable solution.
- dmitriid 4y ago> Examine html source of such sites as Just because someone uses a technology, doesn't mean it's good. I could point to plenty of sites still using first versions of Angular. Is it workable? Yes. Is it good? Also, I'd skip youtube as an example. No idea what incentives they had internally to re-write everything in web components, but they (and the web) paid dearly for it: - Youtube was re-written in v0 of Custom Components. Which was deprecated as soon as they re-wrote it. Chrome couldn't remove v0 from the browser until Youtube was re-written (undoubtedly at great expense) with v1 four years later - The polyfill for v0 was famously extremely slow in Firefox. Given that Youtube is one of the most popular websites (if not the most popular), you can imagine what it did to Firefox's image. If you have an extra billion of dollars for such shenanigans, sure, knock yourself out (especially if it helps to cripple your competition). Also IIRC GitHub is using React as well now, but I can't find the relevant link and discussion right now.