Why React?

As we use a  react js website, like Netflix, we get a very smooth app-like experience.

Traditionally when on a website, we clicked a button, a request was sent to the server and a new HTML page was send to the browser where it then could be displayed. So a traditional website feels slower. We have to wait for loading the HTML page

JS is able to manipulate the DOM, it allows us to change what the user sees, without fetching a new HTML page.

React Js is a client-side js library, it helps us writing client-side js code and it is all about building modern reactive UI for websites.


If JS can do these, then why do we use ReactJs:

    With only Js, we have to write in detail every single step taken, interacting with multiple elements will become very difficult, this is called the imperative approach, where we define step after step. What we can call reinvent the wheel.

    React is all about components, we break the site into components where every component has a clear task. It makes code more maintainable and manageable. React will also do the heavy rending on the screen.

    Many of the repetitive or generally required instruction is written in react js by react js developer, so we don't have to write them. We only work on a high level and it makes building complex user interface easier.

    With react, often built single-page applications (SPAs). On performing any operation on the site, only that/required part is changed. When we click something, that changing the page, but in reality, it loads data using and render it instead of requesting an HTML page and loading them. 

Comments