It is now 2019 and things have changed for better or for worse in Software Industry. It can be tempting to jump into the React bandwagon because of the fact that it builds reputation over the past years and newcomers were also interested in jumping into the bandwagon.
But, is it really worth jumping into the React ecosystem despite the growing emergence of its competitor like Vue in 2019? In this article you will know its definition and basic usage, as well as the current state of React in 2019 and decide for yourself whether you want to invest your time on it or not.
What is React?
Before we dig deeper into more details in React, we must first define what React is and how it can give us an answer regarding on whether it is worth jumping or not.
It is developed by the social media giant Facebook and introduced React in 2013. It is currently in its stable version of 16.8 as of February 2019.
As mentioned earlier, we are using React to build User Interfaces and code it in JSX syntax so that it is structured in an html-like manner although JSX is not html in itself.
Here is the basic sample of React running in CodeSandbox. Go ahead and play around with it:
The Pros and Cons of React
Let us determine the Pros and Cons of React ecosystem:
Easy to understand concepts
As a solution, you can use React Design Patterns to cleanly separate the logic from JSX component if you wish.
Easy to reuse components
Reusing components is quite a cinch as well. Unlike Angular which forces you to do a lot of coding to reuse a component, React is quite easy as importing the component where you want to use it and reuse it right away.
Job market is filled with companies looking for React developers
Wherever you go and search, job market is filled with opportunities and companies that uses React as their front-end library. Let us take a look what the data says about job market for React:
We can immediately see from various sources that React undeniably is one of the most seeking front-end library that companies use next to Angular. So it is safe to say that you can invest your time on this technology if job market is your concern.
Here are some of the companies that now adapts React as their front-end library:
Aside from Facebook which is the company behind the making of React, companies such as AirBnb, PayPal, Netflix, Twitter, reddit, and Lyft just to name a few. Many more companies, including medium to enterprise-level companies are now adapting React from small scale down to big projects these days.
Because of this, you can be sure that the job market in React is so huge and you won’t be missing out in learning it in 2019 still.
As long as there are big guns backing up the library, you won’t get mistaken in investing your time on it as the companies that are adapting it is growing and it won’t stop growing anytime soon.
Loved by lots of Developers
You can be sure that it has been loved by thousands of developers worldwide which means there is a lot of adoption going onto the technology other than the fact that lots of companies are adopting it.
At the whole year of 2018, React came 2nd next to TensorFlow as one of the most loved libraries/frameworks used by Developers in StackOverFlow and awarded as the most used framework by StateOfJs.
This should not come as a surprise since React has been widely adopted the past couple of years.
With facebook and some companies backing it up as well as with growing open-source community, React won’t go away anytime soon in 2019.
It will continue to exist as one of the best front-end libraries to use in front-end web apps for the years to come.
Active open-source community
With more developers contributing in the ever-growing ecosystem of React, I think it is safe to say that it will grow for the years to come.
With all the pros we have read so far, let us examine the cons of investing your time in React ecosystem. Here are some of them:
Documentation can lose you
A good documentation is vital for adopters to understand the whole purpose of your library. Documentation for React could lose you, but it is improving over time.
I remembered taking a look at their documentation way back 2015 and I was not able to totally understand on how to get started or integrate it in my existing projects.
You need to assemble the parts on your own (React Router, Redux, MobX, etc.)
One disadvantage React has is you need to assemble the libraries you need on your own. There is a couple of libraries for implementations you need such as deciding which state management library you need (e.g. Redux, MobX, etc.).
Remember that React is only responsible for your View and building User Interfaces through the use of JSX components and state. Other functionalities are beyond the scope of this library such as Routing, managing global states, caching, etc.
Depending on the use-case or your needs, I think this con is somewhere near the gray area. This could be a pro or a con depending on the situation but I will be putting it under con since it puts new developers at a disadvantage when they are new in adopting the library.
JSX syntax might not be web designer friendly
JSX syntax might not be pleasurable to use for your web designer counterparts when building rich User Interfaces as they might prefer vanilla html over JSX. I think the deal-breaker for this is the use of
className instead of the word
class for defining css classes.
Difficult to setup in existing web apps
This is probably one of the cons that I dislike in React ecosystem which is its difficulty of setting up within existing web apps.
Before I set it up in my existing ASP.net MVC app I literally have to learn how webpack and babel works. So, this takes a lot of time for me to learn and understand how it is being setup. I came from the days of jQuery and AngularJS where I just have to import the script then I am good to go.
You need to figure out the best practices and structure components on your own
Introduces a lot of changes in standards (e.g. Using React Hooks to create a functional state)
This con is somewhere in the gray area as you are not required to use newer methodologies right away which is a good thing.
You don’t need to implement new changes in React such as using React Hooks just to manage your state in a functional way and ditch class-based components altogether.
Although sometimes, more is less so I’m putting this under con.
React beyond 2019
I think there is nothing to worry about if you’re a newcomer or a longtime adopter of this library. The pros I’ve enumerated are enough to tell that the future for React is getting brighter. No doubt about it.
With all our findings for this library so far, everything is still up for you to decide.
If you’re going to ask me, I will use Vue for small-scale projects and prototypes that needed to be done quickly, and use React for long-term projects.
For job market, I recommend React as it is so hot and in-demand for various company scales.
But Vue is definitely catching up for the most part. In my personal experience so far, startups tend to use Vue to get started immediately and I don’t have any problems coping up with it even if I barely touched their documentation – it’s pretty straightforward.
We will see how it goes in the coming years. But it is a safe bet for you to invest your time on React right now based on these evidences I have gathered.