Why is React.js so good for web dev.? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Why is React.js so good for web dev.?

Use JQuery instead? How do older browsers interprete this js lib?

9th Jun 2017, 2:26 PM
Val🐯
Val🐯 - avatar
1 Answer
+ 2
The pure vanilla Javascript is faster in term of performance since it update the DON directly. Provided you know where to update, it should be the faster way to update DOM. React.JS is a Javascript framework with all the general libraries and design it using MVC (Model View and Controller) approach. Your code would tell ReactJS Controller where is the Model (data), and where is the View (browser output), and ask React.JS to execute the code accordingly. You don't handle DOM update in React.JS. React.JS handles DOM update itself whenever View need to be updated. it goes through a process by checking the different between new update and existing one. For speed, Vanilla.JS will win. So I would use Vanilla.JS in small to medium projects. For large or team projects, I might consider React.JS due to the ease of integration and carry out test process, and less error-prone since DOM is handled by React.JS itself.
9th Jun 2017, 3:01 PM
Calviղ
Calviղ - avatar