Created
December 21, 2018 18:31
-
-
Save CarlMungazi/dd5de603c2d2e8eb9f1cf253648be0ad to your computer and use it in GitHub Desktop.
ReactRoot.prototype.render
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ReactRoot.prototype.render = function (children, callback) { | |
var root = this._internalRoot; | |
var work = new ReactWork(); | |
callback = callback === undefined ? null : callback; | |
{ | |
warnOnInvalidCallback(callback, 'render'); | |
} | |
if (callback !== null) { | |
work.then(callback); | |
} | |
updateContainer(children, root, null, work._onCommit); | |
return work; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment