React or Vue — It’s not a debate, It’s a preference
Recently I have seen a lot of articles comparing this two popular Front-End library. Which makes more sense than “Angular vs React” because Angular tries achieve a different goal compared to React or Vue. But is it really a debate? I do not think it is about which one is better. It all comes down your or your team’s background and preference. Let’s take some typical comparisons on the internet and explore them.
Simple App/Style Comparison
Please, stop this. Stop showing the difference between two simple hello world app and try to justify one is better than another. If you are writing even a medium scale application, chances are you will be using ES6 Syntaxes, along with state manager and routing libraries. At this point, your app is already complex and that hello world comparison will not matter at all.
Vue prefers to mutate state directly, while react prefers immutable state. What you like is up to you. Pros of mutating state directly are less code, easier to manipulate state using simple syntaxes. At the same time, mutating state directly can be make debugging difficult.
But again, for a medium or large scale app, chances are you will be using a state manager like Redux, Vuex or MobX. Vue uses Vuex as their primary state manager, but you can use Redux with Vue as well. At the same time, Redux is primarily used with React, but you can use MobX with React which is very similar to Vuex.
Truely Separated Components
Large Scale Application
I have seen a lot of people saying it is not possible to write large scale app in Vue. This is absolutely wrong in my opinion. After writing a medium scale single page app in Vue, I think it will scale absolutely fine in future. Once you have your router and state manager integrated into your app and as long as you are writing separated single component, I do not see what would stop you from writing a large app in Vue. React is built for large scale app you would not have any problem there as well. Both of these libraries are great for building large scale applications.
Mobile, Desktop and Web Applications
You can write a mobile application in both React and Vue. Although React might have a little bit advantages here, as React Native (React’s mobile app development framework) is developed internally by Facebook themselves. With Electron, you can write a desktop application using both React and Vue, as Electron just wraps the web application in a custom chrome browser. In short, you can write mobile, desktop and web applications using both of them.
At the end, it is all down to your preference. Are you a web developer trying to jump into the web application? You might find Vue easier to learn. Are you a functional programmer who is curious about front end development, you might find React easier to learn. The best way to chose between these two to take a short course on a free website. In a week, you will eventually understand how you feel about it and you will be able to make the right decision.
And please, stop trying to push your preference onto others.