June 2016
Intermediate to advanced
910 pages
18h 59m
English
The ReactDOM.render() method takes three parameters: ReactElement, a regular DOMElement, and a callback function:
ReactDOM.render(ReactElement, DOMElement, callback);
ReactElement is a root element in the tree of ReactNodes that you've created. A regular DOMElement is a container DOM node for that tree. The callback is a function executed after the tree is rendered or updated. It's important to note that if this ReactElement was previously rendered to a parent DOM Element, then ReactDOM.render() will perform an update on the already rendered DOM tree and only mutate the DOM as it is necessary to reflect the latest version of the ReactElement. This is why a virtual DOM requires fewer DOM mutations.
So far, we've assumed that ...
Read now
Unlock full access