Pros And Cons Of Using ReactJS

Benny Khoker
3 min readApr 9, 2021

Introduction

What is React JS?

Launched back in 2013, ReactJS is a declarative, efficient and flexible JavaScript library for building user interfaces that are reactive to data changes. Today it is maintained by Facebook, along with it’s developer community. ReactJS is also mainly component based, meaning, that it is split up into separated logic written in JavaScript. This logic can be manipulated through data passed from your app while keeping the data out of your DOM through the use of separated internal component states. In simple terms, ReactJS is an easy way to create a view that will efficiently re-render a page or component every time data changes through state manipulation. Today there are over 30 thousand websites built using the ReactJS framework.

Pros

  1. Easy to learn — If you have a decent grasp of object oriented programming, React syntax can look and feel funny, but it won’t become a blocker of any kind. If you understand JavaScript and Html, combining the two shouldn't be too hard of a concept to grasp, in what is known as JSX.
  2. Creating dynamic apps becomes easier — React apps get dynamic through imports and route-centric code splitting. The use of components helps build contained code that can be individually manipulated with data to output new information where ever that component is utilized.
  3. Components can be reused — Since components manage their own state, they can help compose more complex user interfaces and can be used in different routes. This is helpful for when you want some data to change across specific parts of a user interface.
  4. Much faster rendering — When we are manipulating data on a website through user interaction, normally a web page will use HTML to update its DOM by refreshing the page. However, if JSX was used to manipulate and update the DOM then React will copy the site’s DOM and scan state changes to see what has changed and selectively update that component only. This specific selective updating takes less computing power and loading time.
  5. React Developer Tools — A browser extension available for Chrome and Firefox. It enables developers to view component hierarchies and inspect their current state and properties being passed around.

Cons

  1. Poor documentation — Since ReactJS is a fast-moving library that receives constant updates, documentation remains poor. This affects development process since there isn’t enough time to create proper documentation.
  2. JSX has to be learned- Learning JSX can be a barrier for new developers. Learning to mix-up HTML and JavaScript can lead to confusion and poor understanding of its seemingly complex nature.
  3. Lack of convention- Sometimes adopting new changes leads to new methods and practices while using the library. Developers will need to keep their skills updated in order to follow new code changes and practices.
  4. Still constantly being developed ReactJS is in a constant state of flux, with new features being introduced on a regular basis and old features becoming deprecated. Continuous updates can irritate developers.

Conclusion

ReactJS is extremely popular for a reason. It’ s fast, simple and easy to scale. But, you have to keep its pros and cons in mind when creating your next project.

--

--