[Opinion] 3 Reasons Why You Need To Learn React Right Now!
It’s undeniable that Facebook’s front-end poster child, React, is big in 2018. React is characterised by its component-based method of creating user interfaces and declarative syntax.
With stiff competition from Vue.js and Angular, many developers will be wondering whether React is for them. In spite of this competition, I’m convinced that React is the framework that you should be learning in 2018. Here are my 3 reasons why you need to learn React right now!
Reason 1: React is Exploding 💥
The first question I ask myself when picking a new framework is “How strong is the community around this project?’’. When considering a frameworks popularity I use two tests:
- Is the framework well enough established?
- Is the framework popularity growing or shrinking?
Let’s apply these two tests to React.
Test One: Is the Framework Well Established?
React was first launched just 5 years ago in 2013. That’s a pretty incredible fact when you realise that, at the time of writing React has 109k stars on Github, in comparison with Angular has just 39k.
In fact, React’s success is huge by every metric – for example, it has a larger share of the npm registry than Angular and Vue.js combined.
Firstly, we should think about why we write code. One reason is that we enjoy it. Another reason that we write code is for our jobs. If a framework has a large install base then we can be confident that (when job hunting time comes around) there will be recruiters looking for candidates like us.
This works the other way around as well. If the tools that your project is using are popular, it will be easier to hire motivated and talented developers and the developers you do have will be more easily retained.
But above all, there is one reason to write code in a popular framework, and it’s this: What happens when I get stuck?
That sounds like a really unnatural question. As developers, we often wrongly assume that we are super intellects that can solve any problem. Wrong. That’s why Stack Overflow is still in business.
The truth is that when we write code we rely heavily on the online and in-person community that surrounds us. If the tool or framework we are using is niche, the community around it will be small. As a result, it will be difficult to find blog posts that explain key concepts, get answers from Stack Overflow or tutorials to help us. This will put us at risk of delays and Tech Debt.
Test 2: Is the Framework Getting Bigger or Smaller?
As a developer, you probably agree that our industry moves fast. It’s important to ensure that our skills don’t become devalued before we get a chance to use them. This is why we need to consider where our framework is going in the future in terms of popularity.
Obviously, foreseeing the future requires some degree of crystal ball gazing. But we can use past trends to give us an idea of what will happen in the future.
According to builtwith, just over 1,250 of the top 1 million sites made use of React 2016. By 2017, this number had grown to 2,500. Today it stands at around 16,000.
By learning React you’re learning a skill that is marketable today, but you can continue to be confident (as you can be without being a fortune teller) that it will be a strong skill to have tomorrow also.
Reason 2: React is Webs Object Oriented Moment
Most code that was written in this period was procedural. According to Dikastra, programmers need only 3 tools: assignment, iteration and selection.
As software became more complex, the cracks in procedural began to show. A little while later Object Oriented (OO) languages became popular. The key message of the OO world is that common responsibilities should be kept together and disparate responsibilities should be kept apart.
I believe the web is going through the same journey as the desktop space did all those years ago.
The journey started off in the ‘90s where websites were just HTML.
We got hooked on the interactive goodness. Then along came JQuery and other tools.
By the late ‘00s, the websites we were writing had become full applications in their own right. As a result, new frameworks like Angular.js and Knockout came along.
Frameworks like these depended on the Model View Controller (MVC) Pattern. The MVC pattern stipulated that every website should have one controller to define its behavior. However, after a while, some problems emerged with this.
The responsibilities of the different functionality of each page become merged.
Functions become long and confusing.
The code becomes difficult to understand.
The problems that the web frameworks have now are the exact same problems that developers had all those years ago. The solution then was to create something that kept common responsibilities together and disparate responsibilities apart.
Back then that was Smalltalk or C++ Objects. Today, it’s Reacts Components.
Reason 3: React’s Performance is Amazing
The last reason you should learn React right now is its performance. High performance is critical for web applications. According to Neil Patel, 47% of people expect a webpage to load in 2 seconds or less. Additionally, 33% of your userbase will abandon your website if it takes more than 10 seconds to load.
Just think about the impact. On your business or project, you could be losing 33% of your clients because of a poor framework choice.
Of course, your framework of choice is not the final decider of how your code performs, but by picking the right framework to begin with, you’ll find that you are starting off on the right foot.
So let’s look at how React compares with other frameworks, Jacek Schae from Free Code Camp compared the amount of time that frameworks take to do Chrome’s ‘First meaningful paint’ test. He found that React paired with MobX completed the test in 2623 ms. This was faster than both Angular – which completed the test in 2743 ms – and Vue.js which completed the test in 2820 ms. As a word of caution, React was slower when paired with Redux.
So whilst Reacts performance is not out of the park better than its rivals, it still has the performance to be competitive in 2018’s stiff framework wars, and as a result, keep customers on your site.
React has stiff competition in 2018. Despite this, its popularity continues to explode. I believe that in 2018 React is still the best framework for you to choose from:
- You can be confident that react will continue to have a thriving community around it.
- React’s philosophy represents the next step in the development of web apps.
- React’s performance is the best of the pack.
So I guess there’s only one question left to ask: what are you waiting for?
If you're looking for your next job as a software engineer, have companies apply to you by adding your profile to Snap.hr.