Skip to content

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Oct 14, 2017

Introduce new API for creating roots. Only root.render and root.unmount are implemented. Later we'll add root.prerender, and support for lazy roots (roots with DOM containers that resolve lazily).

Introduce new API for creating roots. Only root.render and root.unmount
are implemented. Later we'll add root.prerender, and support for lazy
roots (roots with DOM containers that resolve lazily).
@acdlite acdlite force-pushed the createroot branch 3 times, most recently from eef374b to 3d91f47 Compare October 14, 2017 02:26
ReactRoot.prototype.unmount = function(callback) {
const root = this._reactRootContainer;
DOMRenderer.updateContainer(null, root, null, callback);
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is not a destroy method now? It's possible to render again after an unmount. With deterministic updates, is the motivation for the new API as strong?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, should probably throw? I'll address in a follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants