4 ms·
Yeah - I've been writing native web component applications for many years now, and I have never, not a single time, needed slots. I have WC scenes, which are t
by claytongulick 3y ago
Yeah - I've been writing native web component applications for many years now, and I have never, not a single time, needed slots.
I have WC scenes, which are top level components that are able to be accessed by a url/deep linking/router outlet.
Scenes are built from html and css that lay out smaller components - sometimes WCs, sometimes vanilla html, depending on what makes sense.
Components mostly take care of themselves, load the data they need, and maintain their own state. Unless that doesn't make sense, in which case data is passed to them via properties.
I have hundreds of thousands of lines of high performance, quality production code running this way and again - have never needed a slot.
Slots are mostly useful for library authors, IMHO.
- brainbag 3y agoThat sounds like an interesting approach haven't heard of before, do you have it documented somewhere?
- claytongulick 3y agoYou may have motivated me to write something about it.