React JS

PreranaMalagi
3 min readOct 23, 2022

--

INTRODUCTION:

React JS is the library in JavaScript. Programming language for web pages is JavaScript. But now, when we see the pages of the previous years as in 2012 and when we see the pages in 2022 we see it has improved much better , dynamic flexible web page. The quality of the page has improved.

With React JS and without!

User requires the fast processing , many other new features were added. Now within one click we can scroll the timeline now. In the year 2012 or before when we click on timeline the whole webpage would get loaded again, But now in 2022 the whole web page is not loaded only the elements is getting loaded in the timeline this is what the React JS does!

How react Is fast??

Above the is a page where the React is applied, In React, we can create many isolated pages and then we can make them whole.

Because of “mvc” (Model View Controller), let us understand this briefly! We write “mvc” as shown below:

This means: Let us considered dataset, we create the dataset in the Model, the user graphical representation of the dataset will be done in View. But the problem was in controller (ie. Loading the web page again) There were many solutions which come up for this, one of them was KVO (Key Value Observation) in which we make a two-way binding between Model and View. Then one more popular solution which is known as “Angular.js” in which there will be looping where it checks, if there are changes in dataset, then it will make changes in interface also . But as we need to make the process very fast React library was introduced to directly reacts with the user interface.

How it works??

In JavaScript we have DOM(Document Object Model), In the previous years, this DOM would take time as it load the document, but using React JS a virtual DOM is created where the virtual representation of the DOM is kept which means when we click on the timeline, the data is already present because of the virtual DOM so now instead of load the whole page only the elements will be loaded and there will be quick response.

That’s it for this week!

Well, I hope you gain interest in reading the article about React JS!

--

--