You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Retain documentElement when appending/removing from Document
creating a root or hydrating into a root with a Document container could error in surprising ways because the document root element was not removed when clearing the container and then a new html element was attempting to be appended to the document. Browsers do not allow more than one root element and this errored leading to a cascading failure where all content was unmounted from the tree breaking the application.
This change changes the behavior of clearContainer, appendChildToContainer, and removeChildFromContainer
clearContainer on a Document container will now remove all children of the documentElement (usually <html>)
appendChildToContainer on a Document container will now 'adopt' the existing documentElement, transferring all stateNode properties and children over to it rather than dirctly appending the child
removeChildFromContainer on a Document container will now remove all children of the documentElement but leave the documentElement in place
0 commit comments