Skip to content

Instantly share code, notes, and snippets.

@CarlMungazi
Created December 21, 2018 18:31
Show Gist options
  • Save CarlMungazi/dd5de603c2d2e8eb9f1cf253648be0ad to your computer and use it in GitHub Desktop.
Save CarlMungazi/dd5de603c2d2e8eb9f1cf253648be0ad to your computer and use it in GitHub Desktop.
ReactRoot.prototype.render
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