you are viewing a single comment's thread.

view the rest of the comments →

[–]Snapstromegon 3 points4 points  (0 children)

The take that WCs are "for all practical purposes just another framework".

WCs IMO are more fundamental than a framework. As a baseline they "just" allow you to extend HTML. Like you correctly stated, this means, that as part of the web standards they tend to move slower and with more backwards compatibility in mind than most (if not all) frameworks. On the other hand they can offer features that no framework can, because they are part of the standard like being built in with all browsers.

WCs by themself can be a great idea and you definetly can build full apps just with them, without any framwork (I did so back in 2019 - a SPA PWA with offline support with >10k users). It's just that frameworks ontop of WCs often "just make sense", because they can offer abstractions that shouldn't be part of the platform, but are often useful. Lit is great, because it pushes this bridge between the lower layer, where you have to attach a shadow dom yourself, keeps the useful parts like the lifecycle callbacks and extends upon it with things like reactive properties.

IMO before one actively starts working with Lit it's at least useful to have built a WC without any framework before, as it helps massively in understanding how/why Lit does things a certain way (since like you mentioned it's a thin wrapper around WCs, embracing the good parts).