ReactJS, JavaScript based front-end library

ReactJS is JavaScript based front-end library developed by Facebook.
Some of the most popular social network like Facebook and Instagram are written in React JS.

ReactJS is really fast rendering framework because with React is possible to render on client and server side together simultaneously and interoperably . React library creates lightweight tree from a JavaScript objects that mimic a DOM tree. Then creates HTML from it and append / insert it to some HTML element. This cause browser to re-draw the page.

React uses the Virtual DOM which selectively renders nodes based upon state changes.

What is Virtual DOM and how does work?

Virtual DOM is abstract version of DOM and it is a technique and set of algorithms that allows us to improve front-end performance. It is much faster than working directly with DOM because it doesn’t require all parts, specially the heavyweight parts that go into a real DOM. If we have one object like  “car” and it has all properties like doors, tires and everything else that car could have.

If we change tires at this object and save changes React runs algorithm which identifies what has changed and recompile it, where it updates the DOM with the difference we have made and render only that part which is changed.

virtual_dom_diff

If we use ReactJS we can boost performance of our applications , because React have very fast rendering like we said before and if we create new project in React it include only dependencies which we really need for startup project.

If you want find out more about React please visit this official page, also you can use starter kit for better understanding.

Leave a comment

Your email address will not be published. Required fields are marked *