DEV Community

a4akki
a4akki

Posted on

Hey guys what's better Vue or React?

You have to give reasons why one is better than the other based on your experience.
Lets begin the discussion...

Discussion (55)

Collapse
mxrcochxvez profile image
Marco Chavez

I personally feel like there’s not a whole lot of reasons to argue between the two. It’s best not to get into the habit of claiming one is better than the other. They’re both two tools that are used to accomplish a similar goal. You’ve gotta love having options!

Collapse
kenovienadu profile image
Ovienadu Ken

I like this

Collapse
andrewbaisden profile image
Andrew Baisden

Honestly almost all of the answers are going to be bias because we all have our personal preferences. I'm going to go with React for 3 reasons.

  1. I have the most experience with it
  2. It has the biggest community out of all of the JavaScript frameworks
  3. It has the most jobs available worldwide
Collapse
yoquiale profile image
Alex

Vue, it's easier to learn, it has a proper separation between logic, markup and style and it has useful directives that makes it so you can iterate over arrays and show an element much easier than mapping an array and returning html.

Collapse
gismo1337 profile image
Sebastian

that's your arguments?

Collapse
yoquiale profile image
Alex

yes

Collapse
sylwiavargas profile image
Sylwia Vargas • Edited on

As a person with (some) expertise in React - and even more so - as a person who co-writes the new React docs, I can give you the definite answer to this question and end all discussion once and for all...
...
...
the answer is...
...
...
Use whatever better clicks for you!

For a detailed comparison, check this Vue's page. Even though it's biased towards Vue, it does offer more factual arguments than this type of discussion.

Also, look at the community:

  • Do you like how folks talk to each other in React community or Vue community?
  • Who are its leaders?
  • Who owns the framework and how do you feel about it?

These are the folks who will answer your questions or who have written courses and posts you will learn from. If you dislike how someone communicates or what values they believe in, it will be more difficult to follow their instruction, participate in the conferences, and so on.

Some folks bring up job market as another argument here. I never learned Vue but I passed three job interviews in it. The frameworks are not THAT different and learning one will be much easier once you know the other, even because you will have the vocabulary to google the tools/solutions you need. Other than that, most employers have coding tests available in another framework and understand that you will need to learn their stack anyway so you won't make significant contributions in the first weeks/months. Lastly, most companies have their own ways of doing things so it's not like if you know React perfectly, you won't be confused at a place that uses React - especially that oftentimes, you will deal with legacy code and patterns that were great a few years ago but they were never updated and now just look odd.

⭐️ PERSONAL (not-so-)HOT TAKE

If I were to choose what to learn if I were to restart my journey right now, I'd make sure that I deeply understand JavaScript. Many of the issues people attribute to React stem, really, from JavaScript and from how React was implemented in this context. Really strong JS fundamentals will for sure not hurt you anyway 😊

Collapse
momander profile image
Martin Omander

I haven't used React so I can't compare the two, but I did want to point out two aspects of Vue that really impressed me. They might help other readers make their choice.

  1. I was able to introduce Vue gradually to an existing web app. This is much safer and predictable than rewriting everything from scratch.

  2. I was pleasantly surprised by Vue's gentle learning curve.

Collapse
peerreynders profile image
peerreynders • Edited on

Better for … ?

Given your last article

neither may be the optimal choice unless hiring is the overriding concern.

Going forward eCommerce may tend more towards the server again.

As SPAs, React and Vue could be held back by their SSR hydration costs.

Back in 2014 eBay decided that React didn't meet their needs, leading to Marko

Another contemporary alternative is

Server-Side Rendering with Astro

Collapse
adam_cyclones profile image
Adam Crockett

Vue is better at being green and react is better at being blue

Collapse
adam_cyclones profile image
Adam Crockett

In fact, react doesn't even try to be green which is the type of Idealism I prefer therefore it's the superior framework

Collapse
aktoriukas profile image
Gedi • Edited on

I would say React:

  • There are more jobs available for React dev. It may be different from where you live, but i think overall that is true.
  • There are more libraries.
  • Bigger community.
  • Wider support.

But if you have a luxury to choose one for your next project, i would go with the one that you never worked before and learn a new skill.

Collapse
codewander profile image
codewander

I don't have a vote, but as someone who has used React lightly, I have always browsed Vue's frameworks and tooling with interest. For example, I was surprised with all the money that Facebook poured into React and JS, that the Vue community ended up creating Vite.

Collapse
kithminiii profile image
Kithmini🌸👩🏻‍🏫

Vue might be the best choice if you're a newer developer and not as familiar with advanced JavaScript concepts, while React is quite well suited for experienced programmers and developers who have worked with object-oriented JavaScript, functional JavaScript, and similar concepts

Collapse
kasmediautamu profile image
KABUYE IVAN

I personally prefer the right tool for the job

Collapse
erefor profile image
Salvador García • Edited on

Vue, because real reactivity, slots, router, pinía, v-model, better component structure, composables, real component life cycle, etc... And it's more easily to use and learn.

use effect = useShootOnMyFoot :v

Collapse
rodrigocnascimento profile image
Rodrigo Nascimento

I think this decision could be different for each case. Both libs are great and both resolve almost anything you'll need on a frontend software development.
But as I said, the decision could be different as in a team where do you have to understand which are the pros and cons to use it, based on team experience. If it was a solo project I think that the lib that you have the most experience is the better.

Collapse
ivanjeremic profile image
Ivan Jeremic

Both good, but if you choose Vue please use script setup everything older is ugly.

Collapse
aarone4 profile image
Aaron Reese

And I think this was part of Cues strengths and is now a failing. You have the old school Options API which I liked as there was less ceremony the new(er) config setup() and then
It makes it harder for new developers to be productive and relies on a toolchain.

Collapse
ivanjeremic profile image
Ivan Jeremic • Edited on

script setup is less code I'm not talking about config setup() and it is close to vanilla html SFCs there is nothing hard about it or complicated. Options API is just not good, but of course people who learned it one way first will always be the first to complain.

Collapse
codingjlu profile image
codingjlu

React is cool, but I'm tired of React. Vue is nice, but I don't want to learn in. React makes me annoyed and frustrated at frontend. There's something about JSX that seems... disconcerting, if it's the best word. React makes me dislike frontend, although I'd probably always use React for frontend. Vue sounds nice, but I don't have motivation to learn it, so there, I just said nothing.

Collapse
jamesvanderpump profile image
James Vanderpump

I ported a big Vue codebase to React and have no regrets. Vue is a joy to work with on smaller projects, but became slow (compiling, vetur vscode extension) and hard to refactor due to poor TypeScript support. Instead of rewriting for Vue 3, I switched to React. There are still many libraries not ported to Vue 3. I think they lost a lot of traction during the lengthy transition to Vue 3. (news.ycombinator.com/item?id=30252405)

Collapse
aarone4 profile image
Aaron Reese

If you like js in your HTML use Vue. If you prefer HTML in your js use React.
The Vue ecosystem is more opinionated and more features are supported by the core team incluilding router and redux store (vuex4 or pinia) which are probably the two most common add ins for any framework.
For me Vue feels more cohesive and the APIs better thought out. React hooks feel like a piecemeal approach to issues as they were encountered.
Just trying to get my head around context and providers in React. You want to use your store in a component, you have to wrap the component in a Provider? WTF? Why can't i just import the store like I do in Vue? I still then have to import useContext and set up a context object so why is the injection outside the component, and why the hell is the ACTION object called with useReducer. It's not reducing anything...

Collapse
moose_said profile image
Mostafa Said

I will always go for Vue. It's really easy to work with and has almost everything you need. Also it's very beginner friendly and highly scalable.

Collapse
charlesw_dev profile image
Charles Watkins

They're both great. What's better depends on your situation and what you need.

Vue.js is very easy to write and learn. You don't need to hire a "Vue Developer" because anyone who knows JavaScript and frontend development fundamentals knows 60% of what they need already. If I were building an SPA and just an SPA, I'd probably use Vue.

React has an unparalleled ecosystem. If I wanted an MPA or a cross-platform application or wasn't sure, I'd go with React. If I wanted to always be able to find devs, I'd also go with React. React is basically the AWS of frameworks.

Either way, you can't really go wrong.

Collapse
aarone4 profile image
Aaron Reese

Vue has Quasar which is a Material Design based components Framework that automatically compiles to SPA, Hybrid, and Desktop (electron) from a single codebase.

Collapse
jfbrennan profile image
Jordan Brennan • Edited on

Vue has some objective wins over React:

  • Vue is half the size of React
  • Vue components use real HTML and CSS
  • Vue is easier to learn
  • Vue's Single File Components are cleaner/more orderly
  • Vue is fully compatible with Web Components

And React has some wins of its own:

  • Bigger ecosystem
  • Bigger community
  • More tooling
  • Backed by a mega corporation (that violates privacy and censors free speech for political and monetary gain)

However, in my experience React's bigger ecosystem is not really a benefit. It's actually a reflection of how many times people couldn't get existing framework-agnostic libraries to work nicely with their React app so wrapping libraries that sink you two dependencies deep as well as all new libraries have to be created.

Oh, and if I had my choice I'd go with Riot riot.js.org/documentation/#todo-ex...

Collapse
omercalik profile image
Ömer Berkan Çalık

If you can't do something with React you can't do it with Vue as well and vice versa. Neither one of them is better than the other its just a preference.

Try them both and continue with the one you liked more.

Collapse
chipzstar profile image
Chisom Oguibe

Personally don't have experience with VueJS, but I have used React / React Native for 4+ years now and I love it! Why I love React?

  • Plenty of third party package support
  • Very strong and supportive community
  • The most popular Javascript framework for web app development
  • Lots of dev jobs use React and require applicants to have experience using it

I guess you could throw NextJS (React) vs NuxtJS (Vue) into the argument for which is the best full stack development framework as a way of comparing the React and VueJS ecosystems, but that's probably another conversation all together :)

Collapse
goldnead profile image
goldnead

Just remember, there is no right or wrong answer. It highly depends on the people you work with, the stack, your own experience and the experience of your colleagues, the stack that is already in use, the budget, etc. What you personally consider as better might be the worst choice for others, even in the same team.
Having worked with both, I consider both options depending on the use-case. Personally, I'm more comfortable with Vue but that is highly subjective and like many others in this thread I don't see any point in arguing between the two.
Go and work with both and then decide for yourself or in your team which one suits better in your situation.

Collapse
raguay profile image
Richard Guay

If you are starting your own project and you can pick, I would go with Svelte since it is a transpiler to vanilla JavaScript. It will produce a smaller footprint to download with the page.

If pure speed is need and not too much fancy stuff, plain HTML, CSS static site is the fastest.

If you are talking about getting a job where you don’t pick, then React is the best choice since there are more jobs available for it.

Collapse
adam_cyclones profile image
Adam Crockett

In what context? Because this question is fruitless I assure you, there is no "better" choice only a preference for code style. What would I choose, svelte or stencil, why because they compile themselves out

Collapse
lexlohr profile image
Alex Lohr

What is better greatly depends on your preferences and requirements.

If you're a CTO, you'll very probably prefer react because there are more developers available and a larger ecosystem of free libraries to choose from.

If you're a web developer, you could appreciate the easier leaning curve or the slightly better performance without the need of extensive optimization or the reasonable handling of state beyond components of Vue.

If you're a mobile developer, you will certainly choose react-native.

That being said, there are a lot of other libraries and frameworks out there that deserve our attention, too, e.g. Astro, Quik, Solid and Svelte.

Each of them has strengths and weaknesses and one of them may be the best choice for your project.

Collapse
eavichay profile image
Avichay Eyal

Are these the only two options?
From my experience, started way back before angularjs or backbone, stick with what will be easier to switch from.

In this case, none of them.

Consider modern approaches like web components. Any of them would do, they are all natively supported and plays nice with anything.

Collapse
paratron profile image
Christian Engel

There's no "better" - they can both build user interfaces.

If you are building for yourself, take a look at both and decide for yourself what you prefer.

If you are working with a team - whatever your team already uses is better. Or what you as a team decide is better.

Collapse
nombrekeff profile image
Keff

It depends on what you're building and what you're comfortable with I guess

Collapse
ritamchakraborty profile image
Ritam Chakraborty

Just want to see how many guys will curse me if i say Angular. 🤭

Collapse
eshimischi profile image
eshimischi • Edited on

No comparison sign here. I’ll choose Vue anyway, always feels more comfortable to work with it.

Collapse
rogerdimonte profile image
Roger

In my experience in React, but you must take into account why you want to learn one, if it is for work or pleasure, if it is for work, I recommend looking for which one is the most demanded in your country, if it is for pleasure, then the one that accommodates best 👋

Collapse
sublimegeek profile image
Jonathan Irvin

It depends.

Collapse
atulcodex profile image
Atul Prajapati

React js 🤘

But

JS first

Collapse
emaj7b5 profile image
Edwin

From the point of view of someone who barely does frontend, I found Vue has simpler routing and overall easier to understand implement especially if you need to implement with short deadlines. On the other hand react has a more robust community where you will find resources to address more complex situations for example when you need to scale. Like someone said before a solid JavaScript understanding won't hurt and will set you to take advantage of any framework.

Collapse
valbuena profile image
valbuena

😂 it's not about the how but the what!

Collapse
waleedhcoder profile image
Waleedh Nihal Ahmed

React

Collapse
giuliopie profile image
Giulio Piepoli

I prefer Vue

Collapse
sebbdk profile image
Sebastian Vargr • Edited on

There's nothing to discuss here, the question is too vague. :)

You gotta break it down, better at what?

This question is basically just asking for a flamewar.

Collapse
pengeszikra profile image
Peter Vivo

Imho React, do not need leave js/ts scope. Cleaner feeling.

Collapse
dantechnologics profile image
Dantechz

react

Collapse
liviufromendtest profile image
Liviu Lupei

Whatever makes the job look more difficult.
After all, this is Résumé Driven Development.

Collapse
areskul profile image
Areskul

Go for Vue!

Collapse
natescode profile image
Nathan Hedglin

Depends, which is the only correct answer.

What do you need a frontend framework for? There are numerous factors.

Collapse
hbgl profile image
hbgl

They are so similar that the only reason I chose React over Vue is because debugging Vue Typescript components is kinda broken right now.

Collapse
joelbonetr profile image
JoelBonetR

There's no better or worse, they are just different tools to solve different needs.

Collapse
rishabh0906 profile image
Rishabh Jain

I personally recommend nextjs.

Collapse
kylereeman profile image
KyleReemaN

You can read a lot of different arguments but my advice would be to just test both of them and pick what style you like best.