@samitouri / QOS-React-2 / commits / 68abbacc39

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.

Sebastian Markbage committed Oct 7, 2013 at 14:53 UTC 68abbacc3954ca088d3bdea4e45789079c4f8069
1 file changed +1 -1
src/core/ReactMultiChild.js
+1 -1
@@ -197,6 +197,7 @@ var ReactMultiChild = {
197 mountChildren: function(children, transaction) {
198 var mountImages = [];
199 var index = 0;
200 + this._renderedChildren = children;
201 for (var name in children) {
202 var child = children[name];
203 if (children.hasOwnProperty(name) && child) {
@@ -213,7 +214,6 @@ var ReactMultiChild = {
214 index++;
215 }
216 }
216 - this._renderedChildren = children;
217 return mountImages;
218 },
219