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.
Sebastian Markbage committed
Jan 24, 2015 at 20:09 UTC
adabfe2f4951ae5fdc57ee5900fc218ab35982a0
1 file changed
+2
-4
src/core/ReactCompositeComponent.js
+2
-4
@@ -113,7 +113,6 @@ var ReactCompositeComponentMixin = {
113
this._instance = null;
114
115
this._pendingElement = null;
116
- this._pendingContext = null;
116
this._pendingState = null;
117
this._pendingForceUpdate = false;
118
this._compositeLifeCycleState = null;
@@ -629,7 +628,6 @@ var ReactCompositeComponentMixin = {
628
var prevContext = this._context;
629
630
this._pendingElement = null;
632
- this._pendingContext = null;
631
632
this.updateComponent(
633
transaction,
@@ -648,12 +646,12 @@ var ReactCompositeComponentMixin = {
646
* @internal
647
*/
648
performUpdateIfNecessary: function(transaction) {
651
- if (this._pendingElement != null || this._pendingContext != null) {
649
+ if (this._pendingElement != null) {
650
ReactReconciler.receiveComponent(
651
this,
652
this._pendingElement || this._currentElement,
653
transaction,
656
- this._pendingContext || this._context
654
+ this._context
655
);
656
}
657