Re:Vue 3.5 – The Vue Point
by gr__or on Wednesday September 04, 2024 @03:31AM
(#41442861)
I've been a React boi since day 1, was happy to leave v1 Angular behind back then. Since then, I've played with them all, and have had a couple professional experiences with Vue, one very recent:
It is not close to React in terms of maturity, which is for me the largest issue with it, especially around TypeScript, Storybook and bugs. In my 10 years of React I have not encountered a single bug in it (not saying there weren't any, I just wasn't affected). In my month of Vue I had one blocking tooling bug and one ripping-my-hair-out-for-a-few-hours core bug. On the upside, a Vue contributor had a video call with me on the former and Evan himself fixed the latter within a day or two
Docs are mostly good, but React wins here too. What React Docs do really well, and what might be under-appreciated, is talking about trade-offs and pitfalls. Vue could use some of that, especially since it promotes mutability as its most idiomatic path, which can have subtle side-effects one should be mindful of. And I would bet many people, coming from more immutable frameworks, fall head-first into these pitfalls.
Vue, like Svelte, is (since v3 afaik) all-in on SFC (Single File Components). I personally dislike the singular focus on this style of component-ing. I like having multiple components per-file, doing higher-order component-ing (e.g. having a record of components) and having other exports from the same file. Sure, one could probably work around these by adding more files, but I don't like it when frameworks incentivize spraying files. I also have that critique with Next.js, though I find the bundler-boundary trade-off argument more convincing there.
I do like the ease of co-located styles though!
An interesting nut that I'm trying to crack is how I feel about Vue's model-binding. Binding a state variable directly to a component, without separately specifying the getter & setter like in React, does make for more concise code. But then there is the aforementioned pitfall of this leading to mutation and possible spooky actions at a distance.
So my summary is: Some interesting differences to React, but overall not worth the divergence and community energy splitting. I think the things React is innovating on are still the most interesting ones in the view-library ecosystem. That said, I found the Vue contributors to be very nice people to interact with.
It is not close to React in terms of maturity, which is for me the largest issue with it, especially around TypeScript, Storybook and bugs. In my 10 years of React I have not encountered a single bug in it (not saying there weren't any, I just wasn't affected). In my month of Vue I had one blocking tooling bug and one ripping-my-hair-out-for-a-few-hours core bug. On the upside, a Vue contributor had a video call with me on the former and Evan himself fixed the latter within a day or two
Docs are mostly good, but React wins here too. What React Docs do really well, and what might be under-appreciated, is talking about trade-offs and pitfalls. Vue could use some of that, especially since it promotes mutability as its most idiomatic path, which can have subtle side-effects one should be mindful of. And I would bet many people, coming from more immutable frameworks, fall head-first into these pitfalls.
Vue, like Svelte, is (since v3 afaik) all-in on SFC (Single File Components). I personally dislike the singular focus on this style of component-ing. I like having multiple components per-file, doing higher-order component-ing (e.g. having a record of components) and having other exports from the same file. Sure, one could probably work around these by adding more files, but I don't like it when frameworks incentivize spraying files. I also have that critique with Next.js, though I find the bundler-boundary trade-off argument more convincing there. I do like the ease of co-located styles though!
An interesting nut that I'm trying to crack is how I feel about Vue's model-binding. Binding a state variable directly to a component, without separately specifying the getter & setter like in React, does make for more concise code. But then there is the aforementioned pitfall of this leading to mutation and possible spooky actions at a distance.
So my summary is: Some interesting differences to React, but overall not worth the divergence and community energy splitting. I think the things React is innovating on are still the most interesting ones in the view-library ecosystem. That said, I found the Vue contributors to be very nice people to interact with.