3 ms·
After some articles stated Web Components are dead, this is welcome development. The current JS requirement is a drag.
by rado 6y ago
After some articles stated Web Components are dead, this is welcome development. The current JS requirement is a drag.
- tehbeard 6y agoSo it provides a way to reuse CSS scoped for web components without needing JS? Neat, I guess, but that's only really useful for basic layout components? Anything more complicated needs JS for behaviour/interactive functionality? I guess it speeds up first paint, but again it feels like you'd send up with components on the page that look functional, but aren't wired up to do what they are supposed to until the JS comes down and adds event listeners etc.
- rado 6y agoYes. Many components don't need JS at all, or use it as enhancement only.
- DaiPlusPlus 6y ago> The current JS requirement is a drag HTML could be so much more useful and time-saving if more functionality could be built without JavaScript. Thanks to CSS tricks, such as using the `:checked` pseudo-class in invisible form elements (toggled with a visible `<label for="">` I can implement neat show/hide effects in websites without any script - my current server-side-rendered project has a reusable "tab control" that doesn't use any client-script at all. It's great because it will always just-work, even if the user has weird privacy/script settings. I can distill what I want down to two simple things: I want more CSS pseudo-classes based on the live DOM state (and the ability to add arbitrary wrapper boxes around or inside any element) and more native HTML elements that can mutate the DOM without requiring any scripts.
- ZephyrBlu 6y agoIt works, but that feels like you're hijacking HTML/CSS for an unintended use case.
- DaiPlusPlus 6y agoThe web today: as a platform for user interfaces and general-purpose content display, is far, far removed from HTML's "intended use case" as a means of sharing simple documents. Like it or not, but HTML+CSS is being used for all kinds of UI - and right now you absolutely need JS to support state-transitions in HTML, even if those states arguably shouldn't need any script because the same logic can be expressed without using a Turing-complete programming language.
- ksec 6y ago>HTML could be so much more useful and time-saving if more functionality could be built without JavaScript. I wish there is a movement for this. But unfortunately the Web Standard today is pretty much dedicated by Google. ( Although Apple and Mozilla still has some leverage )
- zubairq 6y agoCould you post some links? I didn't know that web components were dying out. Thanks
- throw_m239339 6y ago> After some articles stated Web Components are dead, this is welcome development. The current JS requirement is a drag. It doesn't solve a much things. The Web Components spec is IMHO too complicated and doesn't really yield direct results for front end developers.