DEV Community

Discussion on: My random thoughts on Svelte

 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

I kind of disagree though. Using a small abstraction layer to make custom elements more comfortable is still vastly different from using a complete framework that doesn't even use custom elements at all.

What's more, this often isn't even necessary for very simple components: the low-level APIs are often more than enough for those. And as they get more complex, you can first start using meta-programming directly inside the code of your component before moving to a microframework once even that becomes hard to handle, at which point you're probably already building a considerably big component.

As for web components 2.0, I think that's exactly where frameworks should come in. Whether you prefer a huge framework with thousands of lines of code or a small micro-framework like what I use, it's easy to make the current APIs much nicer to use at some performance cost by generating getters/setters or by looking up functions at runtime. The point is that the API leaves the decision to you whether you want to make those trade-offs.