DEV Community

Cover image for React or Vue, which JS framework is best?

React or Vue, which JS framework is best?

Programming with Shahan on March 02, 2024

React is the most popular JavaScript library for building single-page applications. On the other hand, Vue.js claims to be the framework. They shar...
Collapse
 
fpaghar profile image
Fatemeh Paghar

Deciding between React and Vue ultimately depends on specific project requirements, team expertise, and personal preferences. React, developed by Facebook, boasts a large and active community, extensive ecosystem, and widespread adoption, making it a solid choice for complex and scalable applications. Its component-based architecture, virtual DOM, and state management libraries offer flexibility and performance. On the other hand, Vue, known for its simplicity, ease of learning, and gentle learning curve, appeals to developers seeking rapid prototyping and smaller-scale projects. Its progressive nature and intuitive syntax make it an excellent choice for solo developers or smaller teams. Ultimately, both frameworks have their strengths and weaknesses, so choosing the "best" one depends on factors specific to each project and team.

Collapse
 
codewithshahan profile image
Programming with Shahan

Thanks for your summary.

Collapse
 
alienfoxx profile image
alienfoxx

I just have that feeling of is not a human comment 😂 lol

Collapse
 
fpaghar profile image
Fatemeh Paghar

Or maybe you are not human.

Thread Thread
 
alienfoxx profile image
alienfoxx

maybe who knows!

Collapse
 
efpage profile image
Eckehard

If you look at how many posts deal with the problems of React, you get the impression that either

  • Vue is used much less or
  • Using React causes a lot more problems
Collapse
 
squidbe profile image
squidbe • Edited

Having used both, I'm convinced that if Facebook had created Vue and Evan had created React, Vue would have absolutely crushed React. React's popularity, like Angular before it, is largely due to the 800-lb. gorilla behind it. I'm not saying it's junk, just saying that Vue can do what React can do and more, and Vue's performance is excellent. It's a pleasure to work with.

Collapse
 
codewithshahan profile image
Programming with Shahan

That's true. Vue is much faster than React. Like I mentioned, React gained popularity mainly because of Facebook. Just because it's backed by big companies doesn't necessarily make it superior.

Collapse
 
codewithshahan profile image
Programming with Shahan

Agreed. Even though Vue is used much less, it is mostly used for its simplicity and lightweight libraries.

I would go with Vue.js if I needed a simple application with minimal overhead. Its package size being only 21 KBs, quicker in data rendering than react.js.

Collapse
 
efpage profile image
Eckehard

Simplicity is not bad. If you can turn the world upside down with simple means, that's good, not bad.

The word implies some limitations (like "simple minded") but I´m not sure this is true with Vue. Are there any things you can do with React that you cannot do with Vue?

Thread Thread
 
codewithshahan profile image
Programming with Shahan

Great observation! Both frameworks can be used to build small to large SPAs. I can do pretty much the same with them. I don't think there is something I can do in React but can't do in Vue.

So it mainly depends on popularity. I would say the success of React can also be attributed in large part to its creator, Facebook.

Thread Thread
 
squidbe profile image
squidbe

React can also be attributed in large part to its creator, Facebook.

This is unfortunately de rigueur in software. Too many people just jump on board because they think the big companies got it all figured out.

Thread Thread
 
efpage profile image
Eckehard

Or as my grandma would have said:

The devil always shits on the biggest pile...

Thread Thread
 
codewithshahan profile image
Programming with Shahan

lmao.. Its 100% true. I believe Facebook lacks privacy, and Meta softwares are getting worse day by day. So, I can't trust React :(

Collapse
 
tsolan profile image
Eugene

React gives more opportunities on the job market, hence, the choice is obvious.

Collapse
 
taliastorymaker profile image
Talia

Is that really all that matters?

Collapse
 
tsolan profile image
Eugene

Not everything, but majority. It’s ok to know them both, especially for pure frontend devs. However, if we are to choose what to learn to get paid, more widely-used tool should be picked.

Thread Thread
 
taliastorymaker profile image
Talia

Yeah, but development can't progress if everyone always chooses the safest, most popular choice. I guess if you're worried about optimizing your own employability (which to be fair most people are), and you can only learn one, you should learn React. But there's more to development than that.

Thread Thread
 
tsolan profile image
Eugene

You’re right, however, it’s important to understand, that in the world of frontend (js world) new libs and frameworks appear literally every couple of days. And it’s not possible to learn, or even simply get familiar with, all of them. Otherwise, you just put yourself at risk to be ‘jack of all trades, master of none’.

Collapse
 
yogini16 profile image
yogini16

Excellent insight! Both frameworks are applicable for constructing SPAs ranging from small to large scales. I find that their capabilities are quite comparable, and I haven't encountered any tasks achievable in React that cannot be accomplished in Vue.

Therefore, popularity plays a significant role in the choice between them. I believe React's widespread adoption is also influenced significantly by its backing from Facebook, the creator.

Collapse
 
eswann profile image
Swannee

Vuex is no longer relevant unless working older projects. Pinia has been the endorsed state management component of Vue for some time now.
Also Vue has been around almost as long as react. It's 10 years old now, and came less than a year after React.

Collapse
 
codewithshahan profile image
Programming with Shahan

Thanks for sharing. Although Vuex is still maintained by Vue.js, they changed Vuex to Pinia for better typescript support.

Collapse
 
mistabricss profile image
Yehor Sergeenko

As the person who used and worked with both frameworks, I can state that Vue 💯 x times more superior to React by all means.

Collapse
 
codewithshahan profile image
Programming with Shahan

Agreed. Many developers have never tried Vue before. So they have no idea which one is "superior".

Collapse
 
adamdcosta profile image
AdamDCosta

One cool thing about Vue is how you can use it's reactivity system outside of .vue files. So in a js or ts file you can use ref(), reactive(), computed() etc and have reactive state that can be shared between components. Really nice if you need something simple rather that a full on state management library like Pinia.

Collapse
 
codewithshahan profile image
Programming with Shahan

Exactly.. I love this feature.

Collapse
 
thatguyfig profile image
Tom Thornton • Edited

NONE OF THEM, THIS OBSESSION WITH JS FRAMEWORKS HAS TO STOP. JUST BECAUSE FACEBOOK MADE IT DOESNT MEAN YOU NEED IT IN YOUR PROJECT.

I urge everyone here to stop, think, and read about HTMX. We don't need to perpetuate badly design software by convoluting it with a bloated library and approach.

Like this if you want change.

Collapse
 
thatguyfig profile image
Tom Thornton

Like for instance, have you ever sat down and thought about how complicated it is to make a counter that updates when it's clicked and shows the new count in the page?? Like come on it's 2024 and we can't even do that simply, Reacts attempt at state management is a joke

Collapse
 
get_pieces profile image
Pieces 🌟

This is a good comparison.

Collapse
 
nbouvrette profile image
Nicolas Bouvrette

Just to note that React is a library and not a framework. It would have probably been better to compare Next.js with Vue.js

Collapse
 
axmad386 profile image
axmad386

NextJs should be compared to Nuxt. It's doesn't matter how we call React as library or framework, VueJs is solve the same problem as ReactJs do, so it's fair enough to compare them. In other hand, Nuxt solve the same problem as NextJs, I don't know how we call it, meta framework?

Collapse
 
codewithshahan profile image
Programming with Shahan

Vue.js = React.js
Next.js = Nuxt.js

But Angular is a bit different from React. Angular is a full-fledged front-end framework. React uses one-way data binding and virtual DOM trees, whereas Angular uses two-way data binding and real DOM.

Vue. js provides both the one-way data flow & two-way data flow binding for web applications. There is no need to write complex code for two-way data binding, unlike other frameworks.

So, Vue combines the best features of Angular and React in one place.

Let's put aside any naming conflicts. They're just confusing.

Thread Thread
 
nbouvrette profile image
Nicolas Bouvrette

My bad, I forgot about Nuxt. But keep in mind, Vue.js has this header on their homepage: "The Progressive JavaScript Framework."

Now, what does this mean if you compare this to React? It means that it has more out-of-the-box features, such as a router and state management.

But I do agree that Nuxt is more similar to Next.js since they solve common problems.

We just have to keep in mind that if we compare React and Vue.js, they don't come with the same out-of-the-box capabilities.

Thread Thread
 
jesusantguerrero profile image
Jesus Guerrero

React is a factual framework, even when it claims to be a library, it's its code that uses your code to do things(and that's the definition of a framework) and it will be more palpable when React ships its compiler.

The difference you are referring to is whether react is an all-bat included framework or not. which is valid as React offers just the UI part and lets the store management, routing, etc to well-known external libraries, and Vue is a progressive framework.

Collapse
 
aloisseckar profile image
Alois Sečkár

Funny how my Angular-colleague claims that "Vue is a library and not a framework"

Collapse
 
lassazvegaz profile image
LassazVegaz

Vue is a battery full framework while React is a library to make reusable UI components.
React is not supposed to have features as in Vue. You can use React with Vue or any other framework or library because it is a library. But it is not the same with Vue because it is a framework. You cannot compare them. Stop misguiding the community.

Collapse
 
alexkapustin profile image
Oleksandr

First of all, react is not a framework! It's a library

Collapse
 
jburky15 profile image
Joe Burkhart

Svelte is also a solid up and coming choice. I highly recommend it for smaller projects and teams. It's super straightforward, easy to learn and lightweight.

Collapse
 
610470416 profile image
NotFound404

angular is the best

Collapse
 
codewithshahan profile image
Programming with Shahan

You have to choose between two ;(

Collapse
 
folken718 profile image
OldMan Montoya

Thw one your customer needs, the one you can perform well, in other words, the one the project uses or the one younwant to you if you have the option to use.

Tools , all of them are tools to let you create a solution

Collapse
 
cgatian profile image
Chaz Gatian

Is react even a framework? It's just a view engine. You gotta bring everything yourself to get anything done

Collapse
 
szeredaiakos profile image
szeredaiakos

The nr. of downloads is the only metric that matters. The rest is only talk.

Collapse
 
haakon_hestness_cc53fefdb profile image
Haakon Hestness

lol react or vue? What about ANGULAR??? I’ve been making bank on that shit for years….

Collapse
 
aloisseckar profile image
Alois Sečkár

React and Vue are much more popular than Angular nowadays.

Collapse
 
khoafullstack profile image
Vu Anh Khoa

(React + Angular) / 2 = Vue
:d right?