4 ms·
Vue is infinitely better in pretty much every way other than available libraries (specifically UI libraries and some stuff like Motion, though that's soon-to-be
by sensanaty 2y ago
Vue is infinitely better in pretty much every way other than available libraries (specifically UI libraries and some stuff like Motion, though that's soon-to-be framework independent), but to be honest I've never felt that problem in my 6 years working with both, and especially in more recent times pretty much everything is framework agnostic anyways, even the big popular ones like TanStack Query.
The one real edge I'll give React is much better Typescript support due to tsx essentially being a superlanguage of TS. Vue's composables are very good, but it falls apart a bit in actual template usage. Tooling is also better, but that's also because it's simply used much more so has had more investment into making the tooling good compared to Volar for Vue.
But in my opinion everything else surrounding Vue makes it superior. Signals are a better state management pattern, there aren't all the insane footguns that React comes with, performance is better out-of-the-box and is practically impossible to fuck up compared to React where it's hilariously easy to make even the simplest of apps be performance monstrosities, the documentation is (IMO, I find React's docs (yes I've seen the new ones) terrible) best-in-class, the gilded libraries like Pinia, Vue Router, VueUse are far superior to anything in the React ecosystem...
I could keep going, but having worked with both more or less equally, I'd choose Vue 10/10 times over React, no questions asked. I can throw a junior at the codebase and be 100% confident they'll make something that's more-or-less idiomatic Vue code, even with the Composition API which is less stringent than the old Options API, whereas with React they'll always need hand holding and I'll always need to explain why things are rerendering twice or running terribly or what useMemo does or what useEffect does (or doesn't) do...
- CharlieDigital 2y agoAnother vote for Vue. It's harder to do poorly and even when you do, it doesn't punish you the same way that React does.
- FrontAid 2y ago> specifically UI libraries There are certainly more UI libraries available for React than any other framework [1]. But do you think that these are also clearly better? What would be your go to framework for React? To me, it seems that the trend is going to framework-agnostic or multi-framework libraries anyway (e.g. Ark UI or Zag). [1] https://frontaid.ch/web/ui/libraries.html https://frontaid.ch/web/ui/libraries.html
- sensanaty 2y agoI personally completely avoid UI libraries as we have our own that we built in-house, so I wouldn't know, I just know there's more of them and they're more mature in React land. But gun to my head, Shadcn would probably be my choice. For Vue it'd be PrimeVue. Those are the two highest quality ones I've tried in small projects, so no clue how they scale in real-world projects.
- lucsky 2y ago> having worked with both more or less equally, I'd choose Vue 10/10 times over React I have the exact opposite experience, I find Vue hilariously bad to the point of being repulsive. Now what?
- stevev 2y agoUsing both I think it comes down to personal preferences. One learns to appreciate their approaches to the complexity of FE dev. I do think ultimately it comes down to support , tooling and job opportunities. I was an advocate for Vue and now unfortunately I recommend React. Native mobile development is too important to disregard.
- sensanaty 2y agoI mean that's fine, these are all just opinions of randoms on the internet at the end of the day. I find jsx "repulsive", you probably find SFC's "repulsive", and the nice thing is we each have a choice in what we want to use.
- STRiDEX 2y agoI used vue 2 for work during the switch to vue 3. It was horrific to watch as the vue community had to relearn the worst parts of the class components and the massive shortcomings of both the template library type checking and the other parts that basically can't ever support typescript like class mixins. If you want to use vue with a .tsx file you might as well use react. Today, 33% of vue downloads in the last 7 days are for vue 2. There was a lot of things that were nice in the vue world like vite and vuex, but I'd never recommend vue to anyone, especially anyone that wants a good typescript experience. here's an example library button using .tsx in vue https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/components/VBtn/VBtn.tsx https://github.com/vuetifyjs/vuetify/blob/master/packages/vu...
- sensanaty 2y agoI feel like your experience is a bit jaded by the 2 -> 3 transition which is understandable because it wasn't the smoothest, but these days things are very stable, and you can even use the CompositionAPI in Vue 2.7 as it's been backported if you can't upgrade from 2 -> 3. Typescript support is also great because composables are just regular JS/TS files now rather than a Vue-specific thing, the only part that is a bit wonky is in templates sometimes, though for the majority of code out there even template type checking works just as you'd expect, I very rarely have issues even with huge components. Pinia is Vuex, it was made by the same people specifically for Vue 3 due to otherwise having to introduce a lot of breaking changes and is a lot simpler than VueX was, as it leverages the composable pattern and gets rid of the need to do things like `mapGetters`/`mapActions`. And VueX 4 is still an option for those that prefer that approach. > ... class mixins Those were a pain point, but no longer relevant in Vue 3 as mixins have been deprecated. Again, composition takes its place and is in general much more powerful while being simpler. For a great example of what composables can achieve, I'd recommend taking a look at VueUse (https://vueuse.org/ https://vueuse.org/) > Today, 33% of vue downloads in the last 7 days are for vue 2. Another way to look at that is that the majority of the community is on Vue 3 :) > If you want to use vue with a .tsx file you might as well use react. `.tsx` is very much a personal preference thing and isn't really considered idiomatic despite Vue having support for it (unless you're a library author like Vuetify that you linked). I personally can't stand working with `jsx` and find Vue SFC's superior, and again, typechecking these days is much better than it ever was and will work just fine in 95% of situations. Especially with things like component generics being introduced, it's only gotten better and actively getting better. I'd highly recommend you give Vue 3 a try with an open mind, because things have only gotten more powerful while getting simpler since the Vue 2 days.
- t-writescode 2y ago> other than available libraries That's doing a *lot* of heavy lifting here. That's like saying "D is infinitely better than C++, except for available libraries". While my current Electron personal project will probably use Vue because I want to learn it, the change in libraries (and lack of plug-and-play support for whole companies' provided frameworks) is a real barrier to entry for a lot of work.
- sensanaty 2y agoSure, all I said was that I personally never felt the pain there because everything I ever needed was available for Vue, especially these days with so many libraries and stuff like that being framework-agnostic. I've never worked on Native/Electron projects, so there might very well be a huge gap there that is unfilled by Vue, I wouldn't know, though I suspect from experience with both that the gap here is greatly exaggerated (except for Native/Mobile for sure, React Native is basically on its own there) for the large majority of projects.
- stevev 2y agoNice opinion. I started with Vue2/3 and now I’m learning react. Vue is designed better but react is further in development and more widely supported. Native mobile performance was the deal breaker. Ultimately you’ll find it easier to get a job using react vs vue.
- sensanaty 2y agoIndeed React unfortunately wins over in terms of quantity of jobs, I'd argue mostly due to network effects. Hopefully that changes some day! Native development is definitely a pain point, unfortunately there's few options other than React Native there. Problem being that React is backed by Meta, so obviously it has a lot more money being thrown at it compared to competitors like Vue or Svelte.