React

React is a JavaScript library, used for building user interfaces. In the traditional MVC (model-view-controller) architecture it could be thought of as the V (view layer). React was built by Facebook to solve one problem: building large applications with data that changes over time. (Facebook 2016.)

To solve the problem, React was built to be declarative. This means that you define the user interface (UI) once, and when the applications state changes, React actually reacts to the change and rebuilds the UI. (Stefanov 2016.)

React is using a component based architecture. This means solving problems by creating components, and breaking those components into smaller and simpler ones when they get too complex. A component in React is similar to function in JavaScript: it always generates output when it's called. Basically it generates the HTML code that will eventually get displayed in the browser. (Code School 2016.)

To achieve high performance, React keeps track of an in-memory Virtual DOM and uses Virtual DOM diffing to minimize changes to the actual browsers DOM. This enables browsers to only update elements that have been changed, instead of updating the whole DOM. The process is pictured in Figure 1. (Code School 2016.)

Rendering with the Virtual DOM in React:








Comments

Popular posts from this blog

Size & Dimensions & onLayout

Data - Networking - Fetch

Absolute & Relative