4 ms·
fwiw, I started using Vue 3 recently for a project and the new composition API + new script setup feature makes Vue 3 comparable to Svelte in a lot of ways in t
by blindseer 5y ago
fwiw, I started using Vue 3 recently for a project and the new composition API + new script setup feature makes Vue 3 comparable to Svelte in a lot of ways in terms of lines of code. Script setup definitely reduces boilerplate and once I was able to wrap my head around it, I really liked that.
That said, I don't think their documentation at the moment conveys why script setup is so useful (at the time of writing this comment). For example a lot of their examples in their documentation used their old API.
In my opinion, script setup + composition API is really nice. I haven't used React in a few years, so I'm not sure how it compares, but using Vue 3 features decreases the number of lines of code you have to write and maintain (in comparison to Vue 2), and I'm generally always for that. I would go as far and say that they would officially come out and say that the old API is deprecated.
I guess my only quandary is whether to use Vue 3 or just bite the bullet and use Svelte instead. If Vue 2 => Vue 3 is a decrease in 60% of the code, Vue 2 => Svelte seems to be a decrease of 65% ish. Is that extra 5% worth it? I don't know.