React or Vue? Your Decision May Surprise You!

Preston Wallace
5 min readJun 20, 2019

--

Developers that are just getting into the front end framework scene want to know which framework to choose. Sometimes, the answer is simple, but sometimes there’s more to it. In my case, I had to do a deep dive into the differences between the main players to make a solid decision. And…

…my decision surprised me.

Angular

Angular is a in the top 3 players, but there are a couple things I don’t prefer:

  1. TypeScript: Some love it, but others don’t. I’m in the don’t camp. JavaScript shouldn’t be forced to be something it’s not.
  2. Backwards compatibility: When upgrading from V1 to 2, Angular lost a lot of developers. They likely will make future versions backward-compatible, but it’s never guaranteed.
No backwards compatibility? No way…

For these reasons and more, I’ve concluded I prefer React and Vue.

React vs. Vue

React 👍

React is by far the most popular frontend framework today. It is used by most developers and companies. It also has the highest number of domains using React. But what are a few of the real benefits of React?

React Pros:

  • More mature. It’s about a year older than Vue.
  • Bigger ecosystem. For any given task, there is often more than one option which NPM package to use.
  • React is much more widely used, meaning if a company ends up bringing another developer on, it’s easier to find someone that knows React.
  • Backed by Facebook. It’s more or less guaranteed there will be ongoing support.
  • The developer can code in the code (JSX). This also allows for a better experience for someone who knows JavaScript.
  • Since React code is closer to vanilla JavaScript, the developer works on JavaScript skills while working with it.
  • Not as opinionated. More open to configuration.
  • Community support: StackOverflow has over 4x as many posts about React as compared to Vue.
  • Native Support: Though React Native has had troubles with speed recently, it is the React standard for native development. For Vue, the choice is not as obvious, and one must decide between multiple options.

React Cons:

  • There’s more setup involved with React. Vue has a lot of features built in. With things like NextJS and a form library like Formik, it makes things less painful.
  • It’s more complex to learn. Forms and validations are more complex. There are lifecycle methods that must be called/used. Methods must be bound to the component, and state cannot be 2-way bound out of the box.
Writing React Components can feel a bit complex…
  • The react-router library, while backed by Facebook, is not an “official” package. It’s third-party.
  • Similarly, redux is a third-party library. With new React Hooks, though, this could be less of an issue.

Vue 👍

Vue is gaining popularity, and though it’s not as widely-used, it certainly has its benefits. Let’s explore why Vue can be a good choice over React:

Vue Pros:

  • Form validations: Developers can create their own form validations fairly simply, as demonstrated by the creators of Vue. Alternatively, there are validation libraries like Vuelidate and Vee-Validate.
  • Form creation: Forms are pretty simple with 2-way binding, out of the box.
  • Simplicity: There is less setup necessary if using the vue-cli, and once a developer gets used to the Vue syntax, it’s much quicker to get a developer up and running, spending less time in training on the nuances of the framework.
  • It’s open source: Yes, React is open source as well, but Vue is not “steered” by a big company, so it’s likely to be only updated with features that benefit the community, not just a specific company. Also, the rate at which major changes are introduced will be a bit easier to keep pace with.
  • Documentation: React has great documentation, but because so much of the framework comes out of the box, its documentation is more cohesive.
  • Community cohesiveness: React has more posts on StackOverflow, but since there is more than one way to do any given thing in React, the answers can be fragmented. The answers regarding Vue tend to be very similar, thus less confusing.
  • Speed: React and Vue are very close in speed, but without any configuration (needed in React), Vue comes faster out of the box. This is in part due to the fact that an update in a React component triggers a re-render of all its child components. Though this can be mitigated with shouldComponentUpdate, Vue already “knows” which components should update based on changes, and only updates those components.
Vue components are fast. And intelligent. Like Han Solo.
  • Component state and communication: Vue has built-in state management with Vuex, and with event emitters, parent/child communication is a slam-dunk when compared to React.
  • Ability to use JSX as an option, but still uses template by default. I prefer the JSX option, but many developers enjoy using the template instead.
  • Stars on GitHub has actually just surpassed that of React. This doesn’t necessarily mean it’s better, but it is an indication of its popularity rising.

Vue Cons:

  • Limited to the packages related to Vue, and pretty much Vuetify for styling library (styled components)
  • So much is abstracted away that one’s JavaScript skills can atrophy. However, if the developer works full-stack in Node, JavaScript is written far enough on the back end!
  • More opinionated than React.

Conclusion

So which one should you choose? As with anything, it depends!

I dunno what your use case is!

I personally love React, because it’s how I was introduced into the framework world. However, I feel as if Vue is somewhat the best of many worlds. My favorites about Vue:

  • Simple, Clean
  • Unified Community
  • Fast & Intelligent
  • Robust enough to take on all needs of a frontend framework

Given all the above… 🥁

Vue is my choice for my next big app. How about the rest of you? Do you have any points to add? I’d love to hear more from others!

--

--

Preston Wallace

I’m a Full-Stack Software Engineer at Liquidity Services and Teaching Fellow at FullStack. While not developing, I enjoy CA with my beautiful wife and children.