4 ms·
> This is the go to "defense" I often hear from web component proponents. > > If even MDN cannot come up with a better example, something's wrong with tech, not
by spankalee 3y ago
> This is the go to "defense" I often hear from web component proponents.
>
> If even MDN cannot come up with a better example, something's wrong with tech, not with how people use it.
It's not a "defense" it's a very wacky demo and I can't think of a single reason why you'd ever design a component this way. You could also design a React component or Angular component this way, and just like with web components, no one does, because it doesn't make sense.
I can't say why MDN decided to do this, but this is literally the only time I've ever seen a list represented as individual attributes.
> It's not. It only got labeled low-level after the initial failure to attract any developer mindshare
This... just isn't true. Web component APIs are things like customElements.define(), HTMLElement.attachShadow(), HTMLElement.connectedCallback(). These are objectively low-level compared to things that frameworks give you. Branding (whose?) has nothing to do with it.
- troupo 3y ago> It's not a "defense" it's a very wacky demo and I can't think of a single reason why you'd ever design a component this way Because it literally is the example on MDN? > This... just isn't true. Web component APIs are things like Yes, yes they define those APIs. They are both too verbose, badly designed and low-level to use them directly, and they are too high-level, badly designed and useless for most frameworks to use them as the foundation for anything. However, even if we view them as "low-level compared to frameworks" they are still: - extremely high-level (as all DOM APIs) - were lauded as high-level and the end of all frameworks for years before being rebranded as "these are for framework authors akshually" Or, to put it simply, they are as "low level" as React's class-based APIs of yesteryear.
- fkyoureadthedoc 3y ago> were lauded as high-level and the end of all frameworks for years before being rebranded Sources please? I've never met a single person that thought this. > Because it literally is the example on MDN? You're very stuck on this bad example. With even a cursory understanding of how Web Components work you can understand that you can recreate the same component accepting the same props in any popular component based framework. Or using Web Components you could do this example component just as many different ways as you could with another component framework. There are many reasons to not use Web Components. Outside of some specific use cases I wouldn't use them. "A single MDN example weirdly used multiple attributes for list items, instead of child components or one attribute" is not one of them.
- troupo 3y ago> Sources please? I've never met a single person that thought this. Web Components are 12 years old this year. They were lauded as the be all end all of web development to replace all frameworks for 4-5 of those years. > You're very stuck on this bad example. Because it literally is in one of the few authoritative places documenting web technologies. It's not w3schools or some personal blog. I go to MDN to lookup or verify information on web technologies.