Explain how Vue.js is different from React.js

Did you find this post useful? Show some love!

Hey there, we see you aren't signed in.

Please consider creating an account on dev.to. It literally takes a few seconds and we'd appreciate the support so much. ❤️

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.

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

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.

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

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

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.

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

Classic DEV Post from Feb 12

I just got a Raspberry Pi 3. What can I do with it?

Just got a Raspberry Pi 3 setup and it's my first one. If you own a Raspberry P...

Follow @michael to see more of their posts in your feed.