DEV Community

Cover image for Vue or React?
Ghaleb
Ghaleb

Posted on

Vue or React?

A couple of months ago, I chose Vue to be my point of entry to the frameworks realm in web development. I also decided to go in depth-first. So, I practiced barebones Vue, then used Vuetify, then - after getting sick of all the props and emits - I learned Vuex, and now I am playing around with Nuxt. In all this, I have not even glanced at the documentation of React.

What I know about React, I know from occasional blog posts. A common claim I came upon was that Vue is simpler to learn than React. And that does not seem to come with a penalty in terms of performance or robustness. As I understand, from reading and not from experience, both frameworks are equally useful for projects of different scales.

At least from my experience, as I work on my first meaningful web project, I find myself constantly impressed by how simple the development process is. Especially, when component libraries like Vuetify are utilized.

Assuming my understanding is correct (and feel free to enlighten me if it isn't) I have two questions:

  1. With Vue.js readily available, is there any reason to learn React—other than the fact that React came first and therefore has the bigger market share?
  2. If no such reason exists, do you expect Vue to take over in the future? In other words, any reason for a startup project today not to be developed in Vue instead of React?

Latest comments (75)

Collapse
 
mrdulin profile image
official_dulin

Number of questions on stackoverflow

reactjs: 299909 questions
vue: 77204 questions
vue 2: 21940 questions
vue 3: 1510 questions

299909 > (77204 + 21940 + 1510), so using React

Collapse
 
ghamadi profile image
Ghaleb • Edited

But if everyone used this logic, we would have never adopted new technologies. Older players in the same arena will almost always have more StackOverflow questions.

Collapse
 
odedshr profile image
Oded Sharon

React won't die soon as it's being promoted by FB (similarly to MS's .NET).
There are companies today that still develop using jQuery and there are users who still use IE. Old Technologies will always stay (that's how Cobol developers make their fortune ;-) )
Assuming you understood the concept behind it, learning your second framework should be much easier than the first, so why not learn React just for the sake of being versatile?

Collapse
 
dyw972 profile image
Yohan D.

I think for a beginner, React is more affordable. Without Hooks by the way...

I mean, what you do with Vuejs, like v-if and all the v-things... are also possible on React... with props no ? If not, I misunderstood something then.

I tried both and in my humble opinion, React is easier to use and learn than Vuejs.

Plus, the use of all the v-things it's like JQuery for me... Especially when you know that Vuejs is everything " Evan You " loves from AngularJS in more lighter...

Some pep say that React is the new JQuery....

Seriously ?!

I think nothing can stop JQuery to be the most gluttony framework... Here is a joking site => vanilla-js.com

React, Vue, jQuery .... they all come from => Pure Javascript.

So my question is now :

People who don't learn pure Javascript can learn VueJs or ReactJs ?

or

Learn ReactJs, VueJs, JQuery or learn pure Javascript ? 🤷

Thank you for this post !

Collapse
 
andrewbaisden profile image
Andrew Baisden

React is more popular in the west and Vue is more popular in the east. Learning both would be more beneficial for job prospects. However go with the one that has more jobs available in your location. In my case that is React and it is also the framework I have the most experience with.

Collapse
 
8detect profile image
Infinity Detective • Edited

React, simply just js code, no syntactic sugar, i don't need to remember too many non js helper thingies ( wonder why do i have to ? ) . Once i used vuejs until react brought up functional and hook and things have been much neat since then

Collapse
 
deexter profile image
deexter

If you use Vue3 you have to wait for compatibility for many packages. (for example vuetify.)
Typescript support is better in react.

I work with both and I am strongly convinced that vue is not better than react. (Just my opinion)
I would like to be convinced by someone that I am wrong.

Collapse
 
ashiqsultan profile image
Mohamed Ashiq Sultan

My Unbiased view.
I have used React even context API. And in my current job I'm maintaining a React codebase and working on a new project with Vue for 5 months.

In my opinion using things like v-model,
computed and watchers in Vue makes it easier to manage state and reactivity which takes manual coding in React. And combined with VueX it makes it more easier to manage global states.

For me, The ecosystem of Vue (Vue VueX Vue Router...) has been designed to solve the pain points in Angular and React.

Collapse
 
ryansolid profile image
Ryan Carniato • Edited

If no such reason exists, do you expect Vue to take over in the future? In other words, any reason for a startup project today not to be developed in Vue instead of React?

A lot of perspectives flying around on which is better etc.. But this is probably the question of the article and I'm not seeing as much answers to this. My perspective is you will see more startups use Vue, and Svelte, but I wouldn't expect React to lose much ground. If anything you will see them shift up into areas which previously were reserved for Angular, and while Angular perhaps is losing mindshare will still take over places that were Java etc..

I don't expect Vue to take over, mostly in that while different it isn't different enough to necessitate this sort of change. Why choose Vue specifically? Funny enough many of the qualities that might have pushed Vue as different than React are now better represented in Svelte. The challenge of being sort of the middle of things is standing out. Svelte sort of completes the triangle with React and Angular as libraries that exemplify the qualities that Vue balances. That might make it the perfect middleground, or that might make it a messy compromise. Still Vue has a big headstart on Svelte so again I don't expect it to lose position when it comes to the job market and actually grow fairly substantially atleast for now.

But mindshare is interesting. I currently have this visual of React and Svelte sort of circling sort of trapping Vue and bumping Angular out of the party. In the same way Angular is for some reason just getting forgotten in conversations, Vue is sort of getting boxed in comparisons, where someone will use Svelte to exemplify certain things Vue was known for. Sure this is all hype and no one can deny Vue's popularity but the trial I think will come down to how these libraries attack the non-typical customer. Forget Web Applications and tech startups. I'm talking Websites. Biggest potential place to pick up new users. So grab some popcorn and get ready for the competition to heat up.

Collapse
 
ghamadi profile image
Ghaleb • Edited

Yes! Thank you for addressing the main question! The more I read the responses the more I felt that the post triggered a Samsung vs iPhone kind-of debate. lol

The main reason for focusing on Vue and React in my case is inexperience. For instance, I had not heard of Svelte until I read the comments. It definitely is on my radar now, and I am grateful to all the tips and pointers I picked up reading this thread. The post picked up far more traffic than I expected and most of it was generally informative.

However, regarding your response, I think we can spot a criterion that seems to be a substantial driver behind which technology gets more market share and which gets driven out of the picture, and that is ease-of-use.

Now, I am almost definitely over simplifying things here, but ease-of-use is important, I think, because it translates into two things:

  1. Lower costs for established developers (or companies), and
  2. Lower barriers to entry for aspiring developers.

For example, I would argue that much of Python's appeal comes from its simple syntax and extensive and powerful libraries that take away much of the heavy-lifting from developers. I would also argue that the main reason Angular is being bumped out of the party, as you put it, is that it was often branded as the more complex framework that is mainly for big companies.

When I wanted to pick up a framework I looked up the top names and found React, Angular, and Vue. Then I dug deeper, and the first one to go out was Angular, because I kept coming across comments about its complexity. I began with Vue because I needed something I can pick up quickly to start building my portfolio. I already have the disadvantage of being late to the game, so the "simplicity" of Vue eventually made it my point-of-entry.

With this perspective, as I grab my popcorn, I predict the longer-living library will be the one that continues to have the lower learning curve while being robust. I think such library will more often be considered as "the perfect middle ground" and not "the messy compromise". But I agree, nothing is truly predictable in this race.

Collapse
 
ryansolid profile image
Ryan Carniato

I guess I could sort of bucket it all under ease of use. But maybe less friction is better. Up until now I'd never peg the easiest library for the developer to write their apps to necessarily win the day. At least easiest as in least initial learning curve. I do think it plays a more important part with the widening of target audience though.

I'm honestly excited/curious about this next stage(hence the popcorn statement) as even with my general ability to predict this stuff I do not know where this goes. Mostly that since React came out in 2013 (ignoring Angular for a moment) it's been a one party show. All other libraries just followed queue, copied features, communications, terminology, etc.. And it shows.

But where we are heading we are already seeing splitting of opinions, so the next sets of features will see different libraries implementing differently and I don't know what will come out on top. It isn't necessarily the easiest approaches or the most technically performant. I live in this stuff between my work (core team on eBay's Marko framework) and my personal project (Solid Framework). So I genuinely think we might see an interesting change in dynamics with the releases in the coming 12 months.

It's an interesting tension because I know I can no longer identify in an unbiased way with people making the choice for themselves sometimes for the first time. I have too much specific experience understanding all the minute tradeoffs, and honestly hardened too many biases over the years. Funny enough not from choosing one solution and sticking with it but from doing different things and building strong resentment towards certain aspects.

It is often no longer about what I find fun as much as what I dislike the least. So I gravitate towards simple but powerful, which often means more work and leveraging of my knowledge but complete control in what I get and complete confidence in what I teach others. For me that's something like React. But Svelte has aspects of that as well if you understand how it works which is a bit masked behind their compiler. Whereas easy, or configurable are not characteristics I value as much personally but constantly am conscious of when designing.

Collapse
 
ducvtrann profile image
Duc Tran

For work - Vue
For personal - React

Collapse
 
tunlinphyo profile image
tunlinphyo

Svelte

Collapse
 
abhishekbharti profile image
Abhishek Bharti

Vuejs is best, very easy and clean. You can make any enterprise application using vue.
I don't like React although it is very famous. It's jsx syntax is a mess.

Collapse
 
alaindet profile image
Alain D'Ettorre

React is by far the best choice compared to Vue.js and Svelte and any other future framework trying to reinvent the wheel. Also, I believe Svelte has better chances of Vue to survive but still very limited. About React

  • It is the only "cool" framework JavaScript which survived the test of time as it exists from 2013
  • It's the only framework which can suit personal projects, startups and enterprises equally well
  • It's backed by a giant company, which means that even if there's anything lacking or they introduce breaking changes, community and documentation will never be left behind, at least much much less probably than a small framework
  • For the reason above, if any new cool thing comes out (browser features, WASM etc) they'll adapt much quicker
  • Even if a new feature makes React obsolete, there will be a million tutorial online on how to learn the next big thing "coming from React"
  • The immense ecosystem always helps you out

Side note: I prefer to use Angular as I personally think the disadvantages are less than the advantages

Collapse
 
dennisfrijlink profile image
Dennis Frijlink

For me it depends the project I'm working on. I'm a big fan of Vue.js. I love the simple syntax and the clarity. So starting a new project I prefer Vue.js. However React.js is way more flexible and there are way more libraries based on React.js than based on Vue.js.

Collapse
 
ghamadi profile image
Ghaleb

Can you define "more flexible"?

What would be an example of a task you cannot easily implement in Vue because of a limitation that does not exist in React?

Collapse
 
dennisfrijlink profile image
Dennis Frijlink

Not necessarily focused on limitations of Vue.js. First of all Vue.js is a Javascript Framework and React is a Javascript Library. So in practice you see that React is more flexible in working/programming. Think routing or state management. Vue.js has one router (Vue Router) and one state management tool (Vuex). In React you can choose whatever you want. For routing for example you can choose React Router, Hook Router, Reach Router and so on.

Thread Thread
 
dennisfrijlink profile image
Dennis Frijlink

Beside that there a lot of more libraries written for React than for Vue. Think of animation libraries. React has a lot! Framer Motion, React Spring and so on. Vue is way more limited in libraries like this.

Thread Thread
 
ghamadi profile image
Ghaleb

I see your point. Thanks for clarifying.

Thread Thread
 
dennisfrijlink profile image
Dennis Frijlink

Let me what you think about Svelte: bit.ly/3s2NwKh

Thread Thread
 
prograjkamal profile image
prog-rajkamal

TBH, that looks like a point on vue's side as vue router and vuex are official solution deeply integrated with vue, while react libraries are not official, so it fragments the ecosystem and are not as high quality as vue ones

Collapse
 
benn983 profile image
Andrea Benato • Edited

In my first job I used React as main js framework, Now I'm using vue at my current job.
They are different with pros and cons, personally I like more React than Vue, and I'm currently use it in my side projects.
In my opinion there isn't any best framework, but some valuable frameworks that can be used to achive what you want.
For example I like more React in event handling, but Vue for Vuex or animations, the big difference is who writes the code and how it has been written, because you can create mess with both (and I have seen really crazy things in both frameworks)!
The only thing I can say about them is that React innovate more and before than Vue (Vue3 has copy a lot of React stuff) just because there is Facebook behind the scenes!

So at the end pick one, try it, and then if you like it, you can use and master it or if you don't like it you can simply pick and try the other!

Some comments may only be visible to logged-in visitors. Sign in to view all comments.