facebook/react — pull request #2353 by jenshz (2014-10-15 13:01:47+00:00)
Title: De-register null component flag for _rootNodeID when we remove a composite component.

When React renders a composite component, it registers if the result of the render resulted in an empty element
(represented by empty noscript tags).

If the component is removed, this registration is never removed.
This pull-request fixes that problem.

See the following JSFiddle, for an example of one of the possible implications of this.
http://jsfiddle.net/Lhoqemev/2/

In all cases, we expect the getDOMNode() call to return the mounted div,
but because of the above issue, if the previous node was a composite component that rendered to an empty element,
we will get a null-reference instead.

Any feedback is welcome. Unit test of the issue included. The added code lints and all tests pass.