Explain how Vue.js is different from React.js

Did you find this post useful? Show some love!
DISCUSSION (6)

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 Sep 17

How I broke Dev.to on my First PR

A tale of two face-palms

READ POST
Follow @bennypowers to see more of their posts in your feed.
Girish Budhwani
Dev@Microsoft
Trending on dev.to
dev.to Show us your octocat alter ego
#showdev #discuss
Ask me dumb questions about functional programming
#discuss #javascript #beginners
Explain Postgresql Views Like I'm Five
#postgres #explainlikeimfive
What are the essential tools and technologies that every junior developer should learn?
#discuss
Who is hiring? (As of October 2018)
#whoishiring #discuss
Dev.to Review #4: Top 7 Of The Week, Discussed
#discuss #audio #bestofdev #popular
He commits vendor! 😱
#discuss #vendoring
Discuss: What is your Myers-Briggs Type Indicator (MBTI)?
#discuss #nontech #selfimprovement #productivity