DEV Community

Josias Aurel
Josias Aurel

Posted on

React or Vue -Comparison and opinion

One of the most hardest choice once you finish learning the basics of frontend web development (HTML, CSS and JavaScript) is to choose the right framework for your next project. While Vanilla.js may fit the purpose, the code often become messy and hard - mostly because of the document.xx (You get it 😏) and the repetition that comes in. Sometimes (usually), you need to be able reuse your previously written code and make some minor changes and the data they display which looks particularly ugly with Vanilla.js (don't get me wrong).

Frameworks like React.js and Vue.js are there to solve the problem. But while one is a framework (Vue.js) and defines how you should do everything with it, the other (React.js) is a library and therefore provides you with a more open decision on what other library to work with. So which one to choose for your next big things

Warning ⚠️: I am not an expert in web development and I am here providing information about what I've experienced in using both for a month or less.

Ease of use :

In terms of ease-of-use, for someone coming very fresh into using a frontend framework, Vue will seem alot more easier than React. This is because Vue makes use of HTML and CSS in your components and it feels more organise where you keep data, methods and the two way binding also makes it easier to track down and understand what the code does for anyone. React by the side is a library providing alot of customisations - The code looks complicated for someone just coming in.. and the mixture of HTML and JavaScript (JSX (JavaScript XML) makes it more confusing but believe me, use it for a week and you'll feel smooth. React developers will be more comfortable with advanced concepts like OOP which is a plus for them.

Availability of Jobs :

Here you know the winner - probably. React is more used than Vue in the frontend industry. It's aswell used by big tech companies like Facebook, Airbnb, Instagram and many more. This one reason makes React attractive and reliable. You'll find more jobs requiring React developers than Vue.

Origin :

React was made by the tech giant Facebook in order to make their lives easier. On the release as open source, many individuals contributed to the library and the support by Facebook ensured stability and continuity. Vue on the other hand was developed by Evan You at Google while working on the Angular.js. Vue is currently managed and maintained by Evan You and open source contributors. They have put their free time in developing the framework and new features are constantly added. One good point I like about Vue is that they listen to users suggestions (or feel free to fork and contribute).

Components :

In this context, a component is a reusable price of code for your UI. With Vue, your component is a single file containing the HTML, CSS and JS - This makes it easy to share the components with others (Just share the .Vue file). With React, you write only JavaScript, well, it's JSX. Your jsx contain the logic and HTML while your styles are in separate files.

Side Note : I like Vue. It has borrowed the best features from React and Angular and it's simplicity makes it easier to create a new project.

Can it support a big project :

Yes, they both can. With Vue, it's faster to integrate in an existing project compared to React. I've been seeing an argument that Vue is not fit for big projects - NO to this. They both can be used for big projects - this also depends on the level of freedom you want. While React gives more freedom, Vue has alot of existing components you can make use of.

GitHub stars and popularity :

Th winner Here is Vue with about 170000 stars while React has about 154000 stars. This doesn't matter than much but it shows how liked a framework is. React is more popular on stackoverflow but Vue is growing very fast.

Which one to choose :

Well I like Vue - personally.
My recommendation is : Start with Vue... Then migrate to React - Or use both 😎.

I hope you enjoyed this post. Again, well it's opinionated but I am just sharing what I've got using both.

Top comments (2)

diogo405 profile image
Diogo Goncalves

Vue is the best 😁 but if wanna get a job learn React. Nice post btw ✌️

josiasaurel profile image
Josias Aurel

Right 😎