The popularity of front-end frameworks keeps growing every year. And nowadays one can hardly imagine the process of front-end development without any of the JavaScript frameworks. Since recently, there was a tough opposition between two major players: Google-released Angular and Facebook’s JavaScript library React.js. Though, in 2018 a significant change happened in the world of front-end, as one more strong player joined the competition — Vue.js.
As we have already discussed Angular and React in our previous article, let’s have a look at Vue.js and estimate its chances to take the place of one of the front-end behemoths — React.
Background
Before we start digging deeper, let’s outline some general information about two frameworks.
Being developed and maintained by a tech giant Facebook to target its needs, JavaScript library — React has been a major player in the front-end arena for a long time, guaranteeing stability, and long-term support.
Vue.js was created by a former Google employee, Evan You, whose aim was to develop a framework that would integrate the best features from already-existing frameworks.
Core differences
To stay unbiased, I would suggest starting looking at the differences between React and Vue.js in Vue.js documentation (which is quite good and addresses the topic well). It was written by Evan You in cooperation with Dan Abramov (from the React team).
Both Vue and React use virtual DOM (each of them has different implementations though). The main difference between Vue.js and React is that Vue.js uses templates with declarative rendering while React uses JSX, which is a pretty much a JS extension that allows using HTML within it. That means React requires more complex implementations for even simple tasks (compared to Vue.js or even Angular), at the very end one needs more time to develop a complex component too.
Here is a simple login implementation example for Vue: