DEV Community

Girish Budhwani
Girish Budhwani

Posted on

Explain how Vue.js is different from React.js

Top comments (6)

Collapse
 
cdvillard profile image
Charles D. Villard

The Five Year Old explanation: The biggest difference IMO is that React is a tool that you start building in. Vue is a tool you start building with.

A slightly more mature explanation: React and Vue are a pair of JavaScript libraries that only affect the user-facing page. They don't call the server aside from potential AJAX calls, and they don't construct data outside of the concept of View Models. Where React has become an entire ecosystem (and Vue is heading that way it seems with Vue Native), Vue loyaly remains a tool that you can start building with using just a script tag.

Collapse
 
rhymes profile image
rhymes

There's a good comparison written by the Vue team and reviewed by the React team so it should be fair enough: vuejs.org/v2/guide/comparison.html

In brief (I don't know React so I'm just parroting the content of the comparison):

  • component dependencies in Vue are automatically tracked
  • Vue uses single file components without JSX (even if it's supported). SFC are a single file where you put your template, your javascript and your CSS scoped for the actual component. You can still use render functions if you want
  • both have state management libraries
  • Vue is simpler to learn, React has the biggest ecosystem
  • Vue can be used to augment an existing page (a la jQuery)
  • Native rendering is better in React
Collapse
 
tojacob profile image
Jacob Samuel G.

As if you had 5...

If you like to eat (javascript) on your own, there you have reactjs to eat.
If you like to be fed (javascript) in the mouth, vuejs will do it.

Collapse
 
cxa profile image
CHEN Xian-an • Edited

React.js is just a function: (props, state) => view.

Vue.js? A configuration waiting for you to fill in.

Collapse
 
reactiveintent profile image
Mvsica Donvm Dei

IMO, its time for a better reactive function and a configuration to manage the function. Both frameworks ask you for wholesale commitment and depending on what your building you may or not be comfortable with that. They are both historic and with evergreen browsers supporting new template and cssvar breakthroughs and more PLUS the wonderful RxJS toolkit your free to jump into the future.

Collapse
 
ederchrono profile image
Eder DĂ­az

The main difference to choose one over the other is the ease of use. If your team is not that js proficient or you have continuous changes in your team, vue is better to ramp up people quickly