One Year Later: Thoughts on Vue 3
A year ago I wrote some very early thoughts on Vue 3. Let's see how they hold up.
The Good/Not So Good
I mostly had good things to say in this section. The biggest downside was that the Composition API was less intuitive to pick up and some minor differences in things like
$refs took some getting used to. I would say that still holds up. The Composition API is really excellent, but it's much less intuitive to pick up than the Options API. I can understand why the Composition API is being made as the default - it's much easier to share code across your app. Implementing that sort of functionality is inherently complex, so naturally explaining it in the docs is more complicated and difficult to understand than the Options API (which is basically a bunch of object properties that do magic stuff). Things like having to reference
.value on pieces of state still trip me up occasionally but like all things, you get used to it very quickly and hardly notice it after a while.
I have used Svelte sparingly since writing that post, and every time I do I am certainly impressed. I still think Svelte has incredible potential and we will continue to see adoption skyrocket. There's a lot to love about Svelte. I praised it for its simplicity, and contrased that with Vue 3 becoming more complex with the addition of the Composition API and
<script setup>, and I think that still holds up. Complexity is not necessarily a bad thing, but a gentle learning curve goes a long way towards adoption, especially with more entry-level developers.
I think the biggest testament I can give is that when I spin up a side project today, I'm still reaching for Vue. I gladly use Vue 3 with Vite (still maybe the most exciting tech of the past year) and I don't see that changing. Do I still use the Options API a lot more often than the Composition API? Yeah, I do. Change is hard, and I'm VERY used to the Options API. Kudos to the Vue team for supporting both APIs. Keep up the awesome work. ♥️