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
{{ message }}
This repository has been archived by the owner on Aug 14, 2018. It is now read-only.
When having the following structure: React -> (via ReactContent) Angular -> React,
the inner React component is attached to the root of the VDOM:
Instead of being nested under the ReactContent (seen above under the div with key="run"), it's nested as a root node in the VDOM.
These nodes are also kept in the VDOM after the DOM element has been removed.
A workaround for this (but not a solution) by @xjerwa - in AngularReactRendererFactory:
end(){if(DEBUG){console.log('RootRenderer > end > isRenderPending:',this.isRenderPending,'reactRootNodes:',this.reactRootNodes);}// Flush any pending React element render updates. This cannot be done// earlier (as is done for DOM elements) because React element props// are ReadOnly.// Potential fix: manually unmount ReactNodes that don't correspond to a DOM elementfor(leti=0;i<this.reactRootNodes.length;i++){constnode=this.reactRootNodes[i]asany;if(!document.contains(node._parent)&&ReactDOM.unmountComponentAtNode(node._parent)){this.reactRootNodes.splice(i--,1);}}// End potential fixif(this.isRenderPending){// Remove root nodes that are pending destroy after render.this.reactRootNodes=this.reactRootNodes.filter(node=>!node.render().destroyPending);this.isRenderPending=false;}}
The text was updated successfully, but these errors were encountered:
When having the following structure:
React -> (via ReactContent) Angular -> React
,the inner React component is attached to the root of the VDOM:
Instead of being nested under the
ReactContent
(seen above under thediv
withkey="run"
), it's nested as a root node in the VDOM.These nodes are also kept in the VDOM after the DOM element has been removed.
Demonstrated here.
A workaround for this (but not a solution) by @xjerwa - in
AngularReactRendererFactory
:The text was updated successfully, but these errors were encountered: