React JS Pros and Cons in 2020

Share

What is React JS?

In short, React JS is a JavaScript library for building user interfaces. It was created and released by Facebook as an open-source framework in 2013. Since then, React has become one of the top loved and wanted frameworks. It happened because of the focus on user experience and development simplicity. But don’t take our word for granted — you can check the results of the survey conducted every year by StackOverflow:

React JS is one of the most loved web frameworks according to the StackOverflow survey
Source
React JS is one of the most wanted web frameworks according to the StackOverflow survey
Source

There are three main features of React you should familiarise yourself with:

  • Declarative style — creating interactive user interfaces is as easy as pie. All you have to do is to design simple views for each state in your app, and React will take care of updating and rendering components whenever the data will change.
  • Component-based architecture — it’s a method for encapsulating single pieces of a more extensive UI (which are called components) into independent micro-systems. In other words, you can build components and then comprise them to create complex user interfaces.
  • “Learn Once, Write Anywhere” rule — you can re-use existing code whenever you need, i.e. to build new features. React can also use Node.js to render on the server and React Native to boost mobile applications.

What can you build using React JS?

The decision to incorporate React in your tech stack might become easier if you will find out what you can potentially build with it and if it something you are interested in. So without further ado, let’s get to the list of possibilities:

Single Page Application (SPA)

It’s the most often example of using React JS. As a reminder, Single Page Application is an application that doesn’t require page reloading on the user’s side. In other words, a visitor will keep interacting with the same page without the necessity of loading new pages. The great examples of Single Page Applications are Gmail and Facebook.

Cross-platform mobile applications (with React Native)

If you want to create a cross-platform native-like application, you can do it with React and the help of React Native. It’s cross-platform because you need to build only one app instead of two native apps, and it’s native-like because the apps built with React Native perform like native apps.

Dashboard or Data Visualization tools

If you somehow rely on data, it’s crucial to display it in an understandable and visually attractive way to the end-user. Although you can find many ready-to-use dashboard templates, it’s hard to maintain them in the long term, and the price you would have to pay is pretty high. Because of that, it’s better to build it from scratch. And actually, React comes with some features to help you with that task: reusable components and the virtual DOM.

eCommerce or retail websites

In contrast to standard business websites, eCommerce and retail sites contain many more advanced elements like APIs, filters, internal search engine, etc. Thanks to React, developers can implement all of those things by building separate and easy-to-scale components.

Enterprise Web Apps

Component-based architecture is the reason why such enterprises as Walmart or AirBnB decided to incorporate React in their tech stacks. Such an approach allows for dividing the enterprise application development process into smaller parts using single UI components. 

Messaging app

Since Facebook created and released React, it’s a bit surprising that its development team don’t use it for building Messenger. Still, it’s possible to create an instant messaging app with the usage of React because it acts as a WebSocket client. It’s responsible for two-way communication between the server and the client.

Personal or professional blogs (with Gatsby)

Although it’s possible to create a website with the React.js itself, it’s even better to use Gatsby for such a task. It’s a modern front-end framework gaining popularity among front-end developers and JavaScript lovers. You can use it to create super-fast business and personal websites in no time that will pull data from many different sources like WordPress or Contentful.

Social network

This point is highly connected with the previous one because it’s recommended to build social networks as Single Page Applications (SPAs). Since the SPA user doesn’t have to reload the page, i.e. to check new messages, it strongly improves user experience.



What are the benefits of React JS?

Now, even if you don’t have a specific project in mind, take a look at the list of React JS benefits below. Some of them are important from a business owner’s perspective, and some from the technical point of view.

From a business owner’s perspective

  • Cost-effectiveness – since there is no need to start spending big bucks right from the beginning and thanks to shortened time to market (TTM), choosing React as your technology saves you money.
  • Great user experience – nobody likes to wait in line and waiting until the website will load entirely feels just like it. It affects user experience in a bad way because it discourages users from interacting further with your website.
    Luckily, React has features that make React applications not only fast but blazingly fast: Concurrent Mode, React Fiber, Suspense, virtual DOM, to name a few.
  • Popularity – React is not some one-season passing trend. The thing is actually contrary — it’s a stable and mature technology. It will be there in subsequent years, only better.
  • Performance and speed enhancement – when it comes to technology like libraries or frameworks, its performance and speed is the key to success. Well, it’s the reason for React’s success and popularity. Just think about it — if React can handle Facebook, the most often used application out there, it can handle anything.
    And the reason that React is so fast is the virtual DOM. Instead of generating all the HTML files every time, it looks for differences between the old DOM and current file and updates it accordingly.
  • SEO-friendly – not only Facebook loves React, but Google does, too. While search engines have troubles with reading JavaScript-heavy applications, it’s different for React applications. It’s because they can run on the server while the virtual DOM takes care of rendering and returning to the browser.
  • Shortened time to market (TTM) – time is money, especially for startups and other companies with the objective to build digital products. Since React makes the whole development process faster, it’s possible to test the MVP on the market much quicker and make changes accordingly without spending big bucks on it.

From a developer’s perspective

  • Backward compatibility – the thing is some of the frameworks require code rewriting after upgrading the framework to the latest version. Well, not in the case of React.js. The public API remains almost the same every time, so it’s easier for Facebook and other companies to refresh code while using its old pieces.
  • Concurrent Mode – Concurrent Mode is a set of features, created to make React applications even faster and user-friendlier. It makes them adapt to the user’s device capabilities and network speed.
    If you would like to find out more, read our article.
  • Creating Dynamic Web Applications becomes easier – before ReactJS entered the stage, creating dynamic web applications because it required complex coding. ReactJS changed that by simplifying this process with the help of JavaScript Extension. Thanks to JSX, HTML quotes and tag syntax can render specific subcomponents. Also, JavaScript Extension makes creating machine-readable codes easier.
  • Custom React Renderers – extending React.js by releasing React Native forced developers to start implementing different rendering. And that was an origin of Custom React Renderers concept. Thanks to it, you can build custom implementation.
  • Development time – React is all about speed, and it doesn’t mean only page load speed but also development speed. Many things speed up the development process:

    1. ready-to-use solutions
    2. created components are reusable
    3. possibility to set up a web app by using “Create React App”, which is a starter kit provided by Facebook
  • Easy to learn and use – if you have JavaScript developers on board, it won’t take them long to learn React. However, you would need someone experienced to navigate them through the learning process.
  • It’s easy to hand it over – the component-based approach makes React applications readable, understandable and easier to maintain. If the code is clean, it’s easy for an external developer to understand it, and take it over from there.
  • It’s easy to hire React developers – the demand for React developers is growing, and so is the number of them. This is why finding someone with a good grasp of React to join your dev team should be easy.
  • Easy to scale – thanks to the modularity, it’s easy to scale React applications. You can start small and build up from there. For example, you can start with building simple MVP and then make it single-page application as comprehensive as Facebook. 
  • Helpful tools – React developers have a set of handy tools at their disposal called React Developer Tools. It’s an extension to Google Chrome and Mozilla Firefox that allows for checking the components hierarchy in the virtual DOM. It also makes it possible to edit particular components.
  • Huge community – since its beginning in 2013, React community grew rapidly and heck, it’s still growing. There is a great chance that a problem you are trying to solve is already solved or you will easily find someone that will help you out. It’s because there are many contributors out there who want to make React better and better.
  • Reusable components aka modularity – the component-based approach is of much help here because React apps consist of single components, which can be divided into subcomponents. Every component and subcomponents are responsible for one small piece of the whole application and can be reused whenever and wherever you need. Thanks to that, it’s possible to build a complex application out of simple blocks.
  • Testing and debugging friendliness – ReactJS uses native tools to test and debug components before actually using them. 

What are the disadvantages of React JS?

Like any other technology, React also has its flaws. The good news is that the number of them decreases month by month, year by year, and those left behind are acceptable in many cases.

Incompleteness

React provides only the View part of the MVC model. Because of that, you will have to rely on other technologies, too. However, some developers perceive it as an advantage because it allows for full independence. Because of that, every project might look different.

The high pace of development

React is still a quite new technology and it evolves blazingly fast. Therefore, it may be hard for some to keep up this pace because of new features coming out and old ones being forgotten. And some just don’t and won’t like constant changes.

Lack of proper documentation

It’s a very interesting point because opinions are divided. For some, React documentation is poor, and they are in the majority. However, some developers like it. In short, you should see for yourself.


Summary

In the right, technical hands, React is a powerful tool to build reliable, performant and scalable digital products. Business owners will especially appreciate its cost-effectiveness, shortened time to market and SEO-friendliness. On the other hand, developers will enjoy a component-based approach and shortened development time.

If React is not enough for you, check out what you can do with its extension — React Native.

Before You Decide To Work With ReactJS, Make Sure It’s a Perfect Match To Your Project

Comments
Leave a Reply

View Comments (0)...

Related articles:

React vs Vue – A Quick Comparison (2020 Update)

React vs Angular – A Quick Comparison (2020 Update)