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

Is it really worth jumping into the React ecosystem despite the growing emergence of its competitor like Vue in 2019?

Sonny Recio
Bits and Pieces

--

It is now 2019 and things have changed for better or for worse in the Software Industry. It can be tempting to jump into the React bandwagon because of the fact that it builds a 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 the short recap of 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.

Tip: Use Bit to organize share and reuse your JS/React components between your team and/or across your projects. Also, check out Bit’s UI — it makes it really easy to discover shared components.

What is React?

Before we dig deeper into the state of React in 2019, we must first define what React is and how it can give us an answer regarding 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 but XML markup in Javascript.

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 sit 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 concatto 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 to build bigger apps with complex use-cases.

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 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 try to set their own rules and declarations which lengthens the time to learn it.

The job market is filled with companies looking for React developers

Wherever you go and search, the job market is filled with opportunities and companies that use React as their front-end library. Let us take a look at what the data says about the job market to 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 the job market is your concern.

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 adopting 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 mean 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 in the past couple of years.

Stable Library

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.

Aside from Facebook which is the company behind the making of React, companies such as AirBnb, PayPal, Netflix, Twitter, reddit, and Lyft are just to name a few that uses React as their front-end library. Many more companies, including medium to enterprise-level companies, are now adapting React from small scale down to big projects these days.

It will continue to exist as one of the best front-end libraries to use in web apps for the years to come.

Active open-source community

With more developers contributing to 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 a more stable javascript library and get things done are few of the best strategies a developer can do to prevent wasting their time in learning libraries over and over again.

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

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 into my existing projects.

If you got lost in their documentation like me, it’s best to get some courses on Udemy, Pluralsight to get you started in React ecosystem and start building some apps.

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.

But if you have a solid understanding of JavaScript, I this is a pro.

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.

Sometimes web designers don’t want to deal with the logic stuff and it would be better for them to work on just vanilla html structure for good.

Difficult to set up 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 set up. 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, but 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 for 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 long-time 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 the 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 in 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 pieces of evidence I have gathered.

Learn More

--

--

10% Entrepreneur / Fitness Junkie / Software Engineer / Full-Stack web developer / article writer. Loves reading Philosophy during free time