Support comment node as a mount point (#9835)

This means you don't need an extra wrapper div for each component root you need. Rendered stuff is inserted before the comment you pass in.
This commit is contained in:
Ben Alpert
2017-06-27 17:22:07 -07:00
committed by GitHub
parent 52a2365f19
commit 864ae8fa98
3 changed files with 89 additions and 13 deletions

View File

@@ -1433,6 +1433,7 @@ src/renderers/dom/shared/__tests__/ReactMount-test.js
* should warn if the unmounted node was rendered by another copy of React
* passes the correct callback context
* initial mount is sync inside batchedUpdates, but task work is deferred until the end of the batch
* renders at a comment node
src/renderers/dom/shared/__tests__/ReactMountDestruction-test.js
* should destroy a react root upon request