ready to build your product

What Are the Pros and Cons of React JS?

React is a popular JavaScript library for building user interfaces. It was conceived in 2011 by a Facebook software engineer, Jordan Walke, who wanted to combine the speed of JavaScript with new rendering approaches to make websites highly dynamic and responsive to user input. React JS has been an open-source project since 2013, and it’s now used by some of the most prominent companies in the world, such as Netflix, Yahoo, and Dropbox.

Because more and more business owners want to develop websites that change data while reloading pages, the demand for React JS developers has been growing at a rapid pace, but not all of those who would like to give this JavaScript library a try, understand the most important pros and cons of React JS. But without knowing where its strengths and weaknesses lie, it’s impossible to know if React JS is really the best technology for the job.

Pros of React JS

#1 Component reuse

Why would you constantly reinvent the wheel, and spend a lot of time and money doing so, when you can simply reuse code that has already been written and tested by other developers? React JS uses the so-called components, which make it possible to split the UI into independent, reusable pieces, and think about each piece in isolation.

The official website of React JS lists many free components, including Chartify, a lightweight and customizable chart component, Halogen, a collection of highly customizable loading spinner animations, and Material-UI, a collection of components that implement Google’s Material Design.

#2 Virtual DOM

The Document Object Model (DOM), an application programming interface that represents an XML document as a tree structure wherein each node is an object representing a part of the document, is inefficient and slow because it’s necessary to recalculate the CSS, recreate the layout, and essentially repaint the entire web page every time the DOM changes.

React JS overcomes the DOM’s inefficiencies by using the so-called Virtual DOM. Just like the actual DOM, the Virtual DOM represents all elements and their attributes as a node tree. When something changes, React JS updates the Virtual DOM and figures out how it differs from the actual DOM, updating the actual DOM only with what has actually changed.

#3 Thriving community

Largely because React JS is an open-source library, there’s a massive, thriving community of users and developers around it. On GitHub, the project has over 130,000 stars, and it has been forked more than 20,000 times. Independent developers from around the world constantly propose new features and fix bugs large and small.

Since React JS is still very much a Facebook project, it enjoys the support and resources of one of the most successful tech companies in the world, so there’s absolutely no reason to worry about it dying any time soon. In fact, the popularity of React JS has been steadily increasing over the years, which is great news for everyone using it.

Compare the pros and cons of React JS.

Cons of React JS

#1 High pace of development

If you want to know how React JS developers sometimes feel when using their JavaScript library of choice to build web applications, just read the following quote from developers Michael Jackson and Ryan Florence: “In case you didn’t notice we’re driving a car here with two flat tires, the hood just flew up in front of the windshield, and we have no clue what’s going on anymore!”

Indeed, React JS is in a constant state of flux, with new features being introduced on a regular basis and old features becoming deprecated. Some developers are naturally not comfortable with such a high pace of development, preferring to use more mature web development technologies instead.

#2 Lack of conventions

Because React JS is a relatively young library that’s very actively developed by Facebook and contributors from around the world, there are very few established conventions to speak of, and those that exist come from Facebook, such as its component structure or state, props and context distinctions.

Over time, the situation will inevitably change, but not all developers are willing to wait until the dust settles and React JS code produced by 10 different React JS developers looks virtually indistinguishable. For the time being, the React JS documentation is arguably the most authoritative source of React JS best practices and conventions there is.

#3 Steep learning curve

For a relatively young library, React JS is pretty large, and its documentation is far from stellar. In fact, it leaves a lot to be desired, especially when it comes to new libraries like Redux and Reflux. Yes, you can find a ton of React JS resources on the internet, but there’s nothing like having access to comprehensive official documentation.

Summary of pros and cons of React JS


As you can see from our overview of the most important pros and cons of React JS, there’s a lot this popular JavaScript library for building user interfaces has to offer to those who manage to overcome its steep learning curve and deal with the fact that it’s a young technology that’s constantly changing and improving.

Of course, business owners don’t need to concern themselves with the cons of React JS too much because they can simply get in touch with a software development company that specializes in it and let it take care of everything.