Sitemap

Reactjs

2 min readJul 19, 2022

WHAT is React?

React is a JS library

to create Fast & Interactive UIs

-What makes React so popular?

  1. Ease of Development
  2. Single Page Apps
  3. Fast Performance
  4. Declarative UI
  5. Easy to Maintain
  • Ease of Development:-

React is easy to grasp for developers who are familiar with Javascript. So if you have a team of developers that are very well-versed with Javascript, Reactjs should be your best bet. However, even if developers don’t know Javascript, React can be the right place to start.

Single Page Apps:-

In the past, when browsers were much less capable than today, and JavaScript performance was poor, every page was coming from a server. Every time you clicked something, a new request was made to the server and the browser subsequently loaded the new page.

Get Sirtaj Khan’s stories in your inbox

Join Medium for free to get updates from this writer.

React, an app is usually built as a single page application: you only load the application code (HTML, CSS, JavaScript) once, and when you interact with the application, what generally happens is that JavaScript intercepts the browser events and instead of making a new request to the server that then returns a new document, the client requests some JSON or performs an action on the server but the page that the user sees is never completely wiped away and behaves more like a desktop application.

  • Fast Performance:-
  1. It updates ONLY those elements that actually need to be updated
  2. It batches the updates and hence we update the real DOM only a single time. Thus the repainting is also done only once which otherwise would have been done multiple times.
  • Declarative UI:-

Declarative programming is like describing the picture, whereas imperative programming is the instruction for painting that picture. Declarative programming makes code:

  1. more readable: Program that is easier to read because it hides the lower level detail. In declarative programming, we don’t even know about the lower-level details of the system.

2. easier to reason about: the code we write is easier to reason about because it is much abstracted and we describe the solution instead of the procedure.

  • Easy to Maintain:-
  • React.js helps you with batch updates and minimizing DoM manipulations. Flux architecture pattern on the other hand suggests unidirectional data flow making it easy to understand and maintain a large code base.

--

--