Having picked up various JS frameworks in the past, going through the dilemma of which one “is the best” can be difficult and not so obvious. The difficulty in choice can be factors such as learning curve, popularity, and one important factor is longevity.
I’ve had a wonderful time (and you may have done the same) of learning Knockout.js and AngularJS, only to discover that they are superseded by another “better” and “popular” framework in just a year or so. What took you many hours of learning, and building applications for work or personal reasons, having the thought of replacing the framework already is a dreadful thought.
Just have a look at StackOverflow’s Blog post on the brutal lifecycle of javascript frameworks as an example.
You can avoid the same mistake that I did. By doing a little research and looking for some key factors in helping you decide which one to adopt will help reduce the risk. To be fair, React, Angular, and Vue.js has been around for a few years now, and I hope they continue to stay. Who knows?
Rather than go over which one is better in terms of performance, features, and capabilities, I am going to talk about the practicalities of learning or why you would want to learn one over the other.
Last year I had a personal dilemea in terms of decided between React and Angular. I have experience of AngularJS but that was very outdated so I was pretty much starting off on a clean slate and wanted to share my thoughts and approach on how I decided.
The title of this post may be targeted at React, Angular, or Vue.JS, but it can apply to any particular web or JS framework are thinking of embarking on. There is no definitive right or wrong answer, but here some pointers I can share to help you make your decision.
Why do you want to learn React or Angular or Vue.js?
The first step in deciding what to learn, it’s to understand why. Is it for personal reasons? Have a hobby or a potential side project that you want to work on? Perhaps you are just starting in this world of software development. If that’s the case, the choice is more liberal. You can purely pick one based on personal preference.
If however, it’s for work or career reasons, then it’s a little more involved. It might be a new project and there is an opportunity to introduce a new front-end JS framework. It could also be that you want to get a job and can’t decide which way to go?
If it’s purely based on higher income, then one could be having a quick search on job boards and LinkedIn to see what kind of salaries are on offer for React, Angular or Vue.js developers.
You may be presented with a legacy project that needs reviving and you and your team are left with a decision and freedom to choose a framework. It would then make sense to get a general consensus and identify the skillset among the team.
Whatever it is, identify the why first.
Which is most popular?
Going with the most popular framework might be a sensible choice. But don’t let that be the single indicator. The more popular it is, the wider the community. That means there are a lot more people who write blog posts, ask and answer questions on forums such as StackOverflow and share their learnings. This is a good thing. When it comes to you implementing a feature using that framework or finding out how to do something or fixing a bug, odds are there should be something on the internet about it.
So…is React or Angular more popular?
By taking a look at StackOverflow’s survey from 65,000 developers, it has a section on popular web frameworks and surprisingly (for me) JQuery comes on top. React.js comes second and Angular third, Vue.js seventh.
What’s trending?
How about if we take a look at Google trends for React, Angular, and JQuery?
Well, it seems to show that JQuery was very popular in 2015, and seems to be going towards a downward trajectory. React and Angular appears to have a steady and gentle rise although very close to one another. It’s rather difficult to tell where Vue.js as the scale is very small.
Let’s take look at just Google trends for React, Angular, and Vue.js, we can see a better trend line:
Okay, so we can see both Angular (in red) and React (in blue) trending more, until the end of 2018 and beginning of 2019, React just takes the lead slightly. Vue.js doesn’t seem to have taken off very much in the trends.
Don’t just go with what’s popular or trending
Just because it’s trending and popular doesn’t necessarily mean it’s the one to go for.
Let’s take a look at the 21,717 respondents that took part in a survey as part of the 2019 state of JS
For React, in the chart below, if we focus on the in the red area, in 2019, 71.7% of people who used React, would use it again. That’s over 50% of people! And only 8.6% of people who used React, say they would not use it again.
Now, for Angular. Again, if we focus on the red area, in 2019, only 21.9% of people who used Angular would use it again, and 35.8% who used Angular would NOT use it again!
Interestingly, if we take a look at Vue.js, they are not too far off from React. So we can see that although Vue.js is not trending so much nor that popular, it does have a much higher retention rate, similar to that of React.
Choose what’s best for you and your situation
This comes back to the why. Make sure whatever the situation and purpose, it works for you. If you have been reading up till now, you would have seen that Angular is not trending and it seems like its retention rate is rather low. But having said that, if you like the look of Angular, and you follow some of the tutorials very easily, then go for it. Similarly, if you are in a team and everyone has experience in Angular and a new project comes along, it would make logical sense to continue using Angular. Unless everyone has had a bad taste of Angular, then that’s a different story!
Whatever the situation is, make sure it works for you.
Is there Longevity?
The most important factor when deciding whether to learn React, Angular, Vue.js, or whatever it maybe is it’s longevity.
Now, I may regret saying this, but I have a feeling that React, Angular, and Vue.js are here to stay. Famous last words. It seems that these frameworks are becoming more established and adopted by many companies and organisations. Job openings that state “React Developer” or “Angular developer” seems like the norm. Which is a good thing.
React, as you may know, is maintained by Facebook, Angular is maintained by Google and Vue.js has a large and healthy community and created by Even Yu who previously worked for Google. Hopefully, this gives you some comfort that these frameworks are not going to disappear and they have been around for some time now.
What is most likely going to happen is that they will evolve in versions. So long as this continues and is progressive just like any other technology it shows that is longevity.
Side note about Angular’s history
In case you didn’t know, Angular 2.0 was a complete rewrite from its predecessor AngularJS. Yup. So if you learned AngularJS like me, you would have to relearn everything, if or wanted to migrate to Angular 2.0. It was painful and actually caused a lot of controversy among developers.
Dive in and try it
The best way to get a feel of the frameworks is to try it. Just like test driving a car, you will want to give it a go. Is it just you that needs a trial run? Maybe your team needs some exposure as well in terms of picking up the new framework. Give yourself and/or your team a few days to experiment with it. How easy was it to get started and knock up a simple application? Did you encounter any hurdles? Maybe it’s not for you. There will be things you like or dislike instantly. Sometimes things may take time to grow on you.
But this is a good time to give it a chance before you invest any more time. If it’s not fit for purpose. Abandon it right there and then.
- Was it easy to install and get started?
- Were the tutorials easy to follow? (Now this is not about the instructions, but more about how intuitive it maybe)
- Does it offer solutions that you had problems?
- Is it easy to deploy? Are they any special or quirky configurations for production deployments?
So what should you pick?
React. Go for it. Thanks for reading. The end. I’m kidding. Seriously, if there is anything to take away, it would be to choose what’s best for you and your situation and to Dive in and try it.
Personally, I chose React. Why? I found it much easier to learn and follow. I found a great online video course on Learning React - Full Course for Beginners on YouTube. It is 5 hours. Yes. But one can take their time to digest it. I have no affiliation but I would highly recommend it if you are starting it.
Good luck with your choice!