Expose the rendered children before they're actually mounted

Exposing the _renderedChildren property before all the children are fully
mounted. This allows us to debug a partially mounted tree when the debugger
has a breakpoint in the one of the mounting children.

This only has a functional difference in the case where mounting throws. This
will end up not mounting the component anyway. Any remounting shouldn't be
affected by this change.
This commit is contained in:
Sebastian Markbage
2013-10-07 15:02:27 -07:00
committed by Paul O’Shannessy
parent a9b3139ff8
commit 68abbacc39
+1 -1
View File
@@ -197,6 +197,7 @@ var ReactMultiChild = {
mountChildren: function(children, transaction) {
var mountImages = [];
var index = 0;
this._renderedChildren = children;
for (var name in children) {
var child = children[name];
if (children.hasOwnProperty(name) && child) {
@@ -213,7 +214,6 @@ var ReactMultiChild = {
index++;
}
}
this._renderedChildren = children;
return mountImages;
},