- React isn't an MVC framework.
- React doesn't use templates.
- Khan Academy
- and more..
-
Most of React's novelty comes from the Virtual DOM
-
Virtual DOM is nothing but simply a JavaScript object with nested key-value pairs
-
Pete Hunt - The Secrets of React's Virtual DOM (FutureJS 2014)
-
Whenever anything may have changed, re-render everything to a Virtual DOM representation
-
Diff the previous representation with the next one (in JavaScript land, which is, of course, much more efficient)
-
Only update the real DOM with what actually what needs to be changed
-
And does it all at once, in most cases in a single tick of the requestAnimationFrame().
Data changes. React computes a diff (in JavaScript land, which is, of course, much more efficient) and updates the single table cell that needs to change. React replicates the s tate of the virtual DOM into the actual DOM only when and where it's necessary. And does it all at once, in most cases in a single tick of the requestAnimationFrame().
- http://jsfiddle.net/fv6RD/3/
- React’s diff algorithm
- Why is React's concept of Virtual DOM said to be more performant than dirty model checking?
React uses event delegation to listen way at the top of the React tree.
The events are automatically cross-browser (they are React events). They are also much closer to W3C than any browser. That means that for example e.target works, no need to look for the event object or checking whether it's e.target or e.srcElement (IE).