From 7a9c13dee8a37f7dfaf02d76c75f67b403df0045 Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Wed, 9 Oct 2013 11:11:29 -0700 Subject: [PATCH] Set _renderedComponent before it's fully mounted For debugging so that we can inspect the currently rendering tree. I think this should be safe and makes sense since it tried to mount. --- src/core/ReactCompositeComponent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ReactCompositeComponent.js b/src/core/ReactCompositeComponent.js index b2ed6d8810..f1fe60e850 100644 --- a/src/core/ReactCompositeComponent.js +++ b/src/core/ReactCompositeComponent.js @@ -798,6 +798,7 @@ var ReactCompositeComponentMixin = { var thisID = this._rootNodeID; var currentComponentID = currentComponent._rootNodeID; currentComponent.unmountComponent(); + this._renderedComponent = nextComponent; var nextMarkup = nextComponent.mountComponent( thisID, transaction, @@ -807,7 +808,6 @@ var ReactCompositeComponentMixin = { currentComponentID, nextMarkup ); - this._renderedComponent = nextComponent; } } ),