menu

React js - 1 Topics

React full tutorials -2017

DEEP DIVE INTO

React js

Topic:Why React Js

menu

What is ReactJs and why we exactly use it?

React is a JavaScript library for web and building native user interfaces. The main thing, it is a JavaScript library. 

In more clear way if I try to explain "why would you use it?" think about Netflix, how the Netflix website reacts to user. Netflix is buttery smooth and quiet instant, it does not wait for http request to get completed before loading next content. In mobile app where feedback loads instant and frequent.

After all ReactJs is a JavaScript library which loads user interfaces without reloading and leaving the page. So now can ask, since it is a JavaScript then why we use react?

If I could answer to above question, yes you can work with JavaScript and create pages like Netflix but:

  • It quickly becomes cumbersome

  • It quickly becomes error-prone

  • It quickly becomes hard to maintain or edit

  • React offers a way simpler "mental model"

So creating a website like Netflix with vanilla JavaScript will be a huge task, pain and unrealistic. For which React offers a nice perform to meet such task and pain and make website realistic.

At the end writing code in ReactJs is more declarative compare to vanilla JavaScript code which is imperative, where you write lots and lots of code to reach a simple task.

1280 x 720 px