React vs Vue.js
Which tech to choose for your next project?
When starting a project, there are plenty of frameworks you could choose from when thinking of your frontend. But, which one should you choose? I’m going to dive into a couple of the obvious front-runners to help those of you out there struggling with the decision, React and Vue.js.
Let’s get into the similarities of these two technologies before finding out what makes them different. They actually have a lot in common.
- Each one of these technologies have very large, active communities and really good support.
- Both have a component-based architecture and have their own component libraries to make it easier to develop mobile applications with them.
- Share in that they use component lifecycle methods(mounting, updating, unmounting)
- Typescript support
- Backward compatibility
These can be so similar that at first glance you may not notice any of the differences. But in a closer look, I’ll flush them out for you.
React has a very robust community, resulting in a multitude of tutorials, blogs, an online courses to consult with and aid in the workflow of a developer. Not to mention, the various libraries, packages, and tools to pull from.On Github, there are over 175k starred React projects. Some notable companies that use it are Pintrest, Uber, Netflix, Twitter, and AirBnB.
Vue.js has a smaller market share but has started to bridge the gap in popularity as of recently. It is gaining ground and support by the day. However, it does not have as many resources or packages available and the support is not as extensive as React. Some of the bigger names in the game include Gitlab, Adobe, Vice, Trustpilot. The Vue.js Github starred projects amount to 189k.
When it comes to the docs of each of these, I find that one of them is lacking. React’s cover all of the basics and touches on the some advanced concepts, but it doesn’t really get into the details of the whole ecosystem.
Vue’s on the other hand are very detail oriented and have pretty much anything you would need to know in there. They are clear, concise and very easy to understand.
Both are translated into multiple languages.
React Native is super convenient when concerning mobile development allowing you to reuse almost all of the code between Android and iOS. You end up saving time and money, by not having to create two entirely different codebases for each platform. This cross-platform functionality is very hard to beat. You also get great performance and flexibility.
Vue has a couple of different solutions for developing on mobile. NativeScript being the first, allows you to compile into an Android or iOS app once you have written your Vue application. The second is called Capacitor, which allows you to install an API on an existing Vue website to add the mobile functionality. Finally, there is also Vue Native which attempts to combine the Vue and React Native ecosystems on a basic level.
I wouldn’t let the higher number of mobile solutions fool you.
Since both of these frameworks make use of the virtual DOM, they are pretty much neck and neck.
The metrics used to compare these two in this category would be start-up time and runtime performance. Using the benchmark of Slowdown Geometric mean, Vue(1.41) just barely edges out React(1.54) resulting in a difference of only a few milliseconds.
The size of the code plays a part in that slight difference of performance. Naturally, the lighter the code the faster. Since React is slightly heavier, it would make sense that it would perform a little slower.
And the winner is…
Hard to say.
It really just depends on your personal preference. If you would rather write in JSX over HTML, then I would go with React. If you want it to be as fast as computably possible, go with Vue. If you are trying to develop a mobile application, opt for React.
The reality is they are both wonderfully powerful options to help you build out a frontend. I don’t think there is a wrong answer if choosing between the two.
Hopefully this gives you insight into helping you make the decision for which one is right for you. Check out my other blogs and feel free to connect with me on LinkedIn.