So you’re a React developer and you’ve decided to try out Vue.js. Welcome to the party!
React and Vue are kind of like Coke and Pepsi, so much of what you can do in React you can also do in Vue. There are some important conceptual differences though, some of which reflect Angular’s influence on Vue.
I’ll focus on the differences in this article so you’re ready to jump into Vue and be productive straight away.
How much difference is there between React and Vue?
React and Vue have more similarities than differences:
- Both are fast and lightweight
- Both have a component-based architecture
- Both use a virtual DOM
- Both can be dropped into a single HTML file or be a module in a more sophisticated Webpack setup
- Both have separate, but commonly used, router and state management libraries
We’ll break it all down below.
With Vue.js, components are declared with an API method
.component which takes arguments for an
id and a definition object. You’ll probably notice familiar aspects of Vue’s components, and not-so-familiar aspects: