From adabfe2f4951ae5fdc57ee5900fc218ab35982a0 Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Sat, 24 Jan 2015 20:09:14 -0800 Subject: [PATCH] Remove _pendingContext There is no way to queue an update to a context so there is no need for this field. The only way to get a new context is from above. Soon _pendingElement will get the same treatment. Once _setPropsInternal can be removed. --- src/core/ReactCompositeComponent.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/ReactCompositeComponent.js b/src/core/ReactCompositeComponent.js index 5d142e5981..35fe4e4220 100644 --- a/src/core/ReactCompositeComponent.js +++ b/src/core/ReactCompositeComponent.js @@ -113,7 +113,6 @@ var ReactCompositeComponentMixin = { this._instance = null; this._pendingElement = null; - this._pendingContext = null; this._pendingState = null; this._pendingForceUpdate = false; this._compositeLifeCycleState = null; @@ -629,7 +628,6 @@ var ReactCompositeComponentMixin = { var prevContext = this._context; this._pendingElement = null; - this._pendingContext = null; this.updateComponent( transaction, @@ -648,12 +646,12 @@ var ReactCompositeComponentMixin = { * @internal */ performUpdateIfNecessary: function(transaction) { - if (this._pendingElement != null || this._pendingContext != null) { + if (this._pendingElement != null) { ReactReconciler.receiveComponent( this, this._pendingElement || this._currentElement, transaction, - this._pendingContext || this._context + this._context ); }