I've learned React (after being in love with Vue)
Tags: vue, react, vscode, webdev
Published: 2022-05-13 14:44:23

These days, a new trending front-end framework is released every now and then. But React and Vue.js still stands as the most popular among all the other alternatives. And although both are performant, elegant, and arguably easy to learn, they have some different opinions on how certain things should be done, and different ways of achieving the same end result. I believe getting comfortable and efficient with a frontend framework is mostly about learning the patterns of doing regular stuff.
#TL;DR
React is good (but I still love Vue more), I need to work, think differently, and have the best community support available on the internet.
##My story with Vue
{% youtube nhBVL41-_Cw %} 
I’ve been a long-time Vue.js fan and still think it’s a great framework with a lot of potentials. It was the first JS framework I learned and will always have a special place in my heart. It’s easy to learn and with the Vue CLI, you can create a functional site in minutes and easily deploy it. I liked the organization of the .vue files with their separate HTML, JS, and CSS sections. I even used it during my summer and my end of studies internships. So here you may ask me why you switched to react? you obviously like this framework. Ok, let me explain.
##Vue Vs React (or How developers feel about them)
{% youtube Tn6-PIqc4UM %}
I'm not making this article about which framework is best for you but we need to know what professionals think about the two frameworks. The way experts see React and Vue might help others decide which of the two is more suited to their current expectations and capabilities. Although there aren't available any reports asking this question anymore, answers from 2018 are rather ever-green aspects so we can treat them as up to date to a huge extent. What devs love about Vue.js:
- Elegant programming style and patterns
- Easy learning curve
- Good documentation

What devs love about React:

- Elegant programming style and patterns
- Rich package ecosystem
- Widespread usage

React took the top spot in the most popular web framework list in the 2021 Stack Overflow Survey, with 40.14% of respondents choosing React while Vue.js went two positions up getting 5th place. Given its steadily rising popularity, we can predict its growth in the following years.
![stackOverflow survey](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v699vq0sgzs3857u1qnk.png) 
##Job market
![SoV 2021 vue](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/htt1v1skfbh6lszl3lh0.png) 
Although Vue.js is easy to learn (60% of [the SoV 2021 respondents](https://2021.stateofjs.com/en-US/libraries/front-end-frameworks/) describe it this way), there are more React developers on the market who are already experienced in this framework and would use it again.
![SoV 2021 react](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rbjowogywpgrfpni7rqr.png) 
So if there is a business need for a more complex app, getting an experienced React developer who can jump into the project and start working immediately can take less time. On the other hand, the pool of Vue.js developers has been steadily growing in the last six years so this is becoming less challenging, too.

Interestingly, [The Jet Brains Dev Ecosystem 2021 survey](https://www.jetbrains.com/lp/devecosystem-2021/javascript/) showed slightly different numbers and revealed that the developer knowledge and regular usage of the two frameworks is high, with Vue.js being on the rise. The share of Vue.js users grew from 34% in 2020 to 43% in 2021 while React experienced a drop from 64% to 49% in a YoY comparison.
![Jet Brains Dev Ecosystem 2021 survey](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w4o3qddu5hzwi646ulfl.png)
##Community support
![React community support](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/64tca6a47xi9t5px36of.png) 
One of the most important aspects you should see too is the community support around the framework, this was an issue I slowly realized as I was using Vue throughout the course of this year. I don't really want to talk about this, But the reality is React community is much bigger than Vue's and this is because React is older than Vue so you can find more articles, tutorials, and packages to help you on your React project more than Vue. So in terms of the community support react is the clear winner for me but this does not mean things will stay like this for a long time.
##Conclusion
{% youtube HyWYpM_S-2c %}
The purpose of this post was not to say that Vue is bad - in fact, during the year and a half time span that I worked with Vue, for the most part, I was quite pleased with it and still believe it to be a fantastic frontend framework. I think that it is an easy framework to learn and a good starting place for new web developers. But this does not mean you should stop learning new things and you really should try to think differently and see other developers' viewpoints.

Sources:

- https://www.techmagic.co/blog/why-we-use-react-js-in-the-development/#:~:text=React%20is%20a%20JavaScript%20library,js%20is%20virtual%20DOM.
- https://www.jotform.com/blog/7-reasons-why-you-should-use-react/