It seems you can't "map over" slots in a Web Components. E.g. if you have a <x-list> with one catch-all <slot> for children, you can't then wrap each child in a <li>. Everyone gives up and just pushes the structure up to the light DOM (<x-list><li>…</li></x-list>) or exposes some helper (<x-list><x-list-item/></x-list>. Amazing that *every time* I try Web Components they fail in the most basic ways, making it painfully obvious they were designed by people that don't actually do web development.
As usual with most new "Web API” features, the conventional wisdom that develops is “major portion of feature X is an anti-pattern”. In this itse, there seems to be a growing consensus that "shadow DOM" is an anti-pattern or should be used incredibly sparingly. Which is crazy since major features that WC were supposed to finally deliver (like style encapsulation) are *only* possible with shadow DOM. But its so difficult to use that people are now like "oh global styles are actually better".
If you dig into the actual complaints however, it quickly becomes obvious that people *do* want style encapsulation, just with certain very trivial features that Web Components do not provide. Half the requests are just around the very reasonable desire to control some amount of style boundary crossing (which the slot proposal thought it would handle, but doesn't). But since its so difficult to do these simple things, people just say “I guess style encapsulation is more trouble than its worth”.
Don't forget how long it took to get declarative shadow DOM, a feature that *any web dev* would have considered a v1 necessity since they'd otherwise *not be able to use it with their current server setups*. This is a problem that keeps repeating itself. Web API designers think have generally low opinions of web dev frameworks (e.g. React), and attempt to provide a "native" solution without understanding what is actually liked about the framework, and are then frustrated when devs don't use it.
@tolmasky
According to Safari devs, Apple wanted declarative web components, but lost to Google: https://x.com/rniwa_dev/status/1352322006448947203
On top of that it took the web components people until 2022 to finally acknowledge the problems (everyone had already told them since at least 2015) and to have any sort of roadmap https://w3c.github.io/webcomponents-cg/2022.html