React in 2019: Is it still worth jumping the bandwagon?

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.

So React is the “V” layer in MVC or we commonly used as “View”. It is responsible for building View components and holds “State” using JavaScript which means it is used to build User Interfaces. It uses JSX as its syntax template for better structuring of the components, although you can use vanilla JavaScript to use React by simply importing React CDNs directly in your html.

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.

Basic Usage

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:

Pros

Easy to understand concepts

React has surprisingly easy to understand concepts that sits on top of your existing javascript knowledge so you can be sure that the learning curve is easy. The pattern heavily relies on functional programming patterns. Meaning, your data should encourage immutability as much as possible such as using `concat` to create an immutable array.

You won’t get mistaken in using this as your default javascript library for user interfaces.

JSX Syntax

Another advantage of React is it’s using JSX syntax which allows you to blend both JSX and javascript inside one script file or component.

This advantage might pose as a controversy to some of the developers, especially those who are practitioners of Separation of Concerns as you can code javascript logic and JSX inside one component and could get messy as the logic gets bigger.

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.

Feels like you’re coding in native JavaScript

React doesn’t try to reinvent the wheel. Rather, it blends perfectly with JavaScript unlike any other libraries/frameworks who tries to set their own rules and declarations which lengthens the time to learn it.

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:

Taken from: https://medium.com/zerotomastery/tech-trends-showdown-react-vs-angular-vs-vue-61ffaf1d8706
Taken from: https://www.codeinwp.com/blog/angular-vs-vue-vs-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.

Most used front-end technology from stateofjs
Most-loved libraries/frameworks used by developers in 2018. A survey conducted by StackOverflow worldwide

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.

Stable library

Companies that uses React. Credits to stackshare.io

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.

I am sure that developers these days are tired of looking for another “emerging” libraries in front-end arena and just wants to settle with the best stable javascript library they can ever find so that they can simply focus on building things. Javascript fatigue is real.

Adopting more stable javascript library and get things done are few of the best strategies a developer can do.

Cons

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.

I think another deal-breaker for JSX syntax is the fact that javascript logic and your JSX syntax were merged into one. They don’t want to deal with the logic stuff and it would be better for designers to work on just vanilla html for good.

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.

Now you need to learn and understand how to bundle and transpile javascript. It’s getting more and more complicated. Hopefully, for the best.

You need to figure out the best practices and structure components on your own

Unlike its front-end counterparts like Vue and Angular, you are responsible in structuring your components for the most part in the case of React as JSX sits alongside your javascript logic by default.

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.

Conclusion

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.

A Software Engineer who loves to code and write articles.

Leave a reply:

Your email address will not be published.

Site Footer