4 ms·
But wouldn’t you be happier if each and every component on the page paid the price of a full templating system? No? Oh yeah, I forgot that Web Components are
by earthboundkid 3y ago
But wouldn’t you be happier if each and every component on the page paid the price of a full templating system?
No?
Oh yeah, I forgot that Web Components are a terrible idea that are only marginally successful because they can claim to be a “standard” when they’re not any more standard than any other JavaScript.
- spankalee 3y agoYou only "pay" for as many template systems as you use, not one for every component, and modern template systems are far smaller than the major frameworks.
- earthboundkid 3y agoEach independent script you import is another load blocker. You could have scripts A and B both import template C, but then you're slowing things down even more, and no "HTTP2 push!" is not the answer.
- satvikpendem 3y agoI honestly don't know how WCs got through the standards process successfully, they're so bad.
- earthboundkid 3y agoThe answer is that they're from ~2013: before React etc. taught us how to make SPAs. It was an early attempt, so it sucks. JS is best when it "paves the cowpath" and takes something we could already do slowly in browser and gives us a better native API for same thing, like querySelector or IntersectionObserver or how there was no built in way to parse a query string before URLSearchParams. Anytime JS goes first, the API is crap, like the DOM Node APIs themselves.