Removed ReactElement._context (cleanup)
Jim committed
May 27, 2015 at 16:37 UTC
4e129220a6a081199b4cae16dfc11f2232a2c092
4 files changed
+4
-9
src/isomorphic/classic/element/ReactElement.js
+3
-6
@@ -11,7 +11,6 @@
11
12
'use strict';
13
14
-var ReactContext = require('ReactContext');
14
var ReactCurrentOwner = require('ReactCurrentOwner');
15
16
var assign = require('Object.assign');
@@ -85,12 +84,13 @@ function defineMutationMembrane(prototype) {
84
* work with a dynamic instanceof check. Nothing should live on this prototype.
85
*
86
* @param {*} type
88
- * @param {string|object} ref
87
* @param {*} key
88
+ * @param {string|object} ref
89
+ * @param {*} owner
90
* @param {*} props
91
* @internal
92
*/
93
-var ReactElement = function(type, key, ref, owner, context, props) {
93
+var ReactElement = function(type, key, ref, owner, props) {
94
// Built-in properties that belong on the element
95
this.type = type;
96
this.key = key;
@@ -191,7 +191,6 @@ ReactElement.createElement = function(type, config, children) {
191
key,
192
ref,
193
ReactCurrentOwner.current,
194
- ReactContext.current,
194
props
195
);
196
};
@@ -213,7 +212,6 @@ ReactElement.cloneAndReplaceProps = function(oldElement, newProps) {
212
oldElement.key,
213
oldElement.ref,
214
oldElement._owner,
216
- oldElement._context,
215
newProps
216
);
217
@@ -273,7 +271,6 @@ ReactElement.cloneElement = function(element, config, children) {
271
key,
272
ref,
273
owner,
276
- element._context,
274
props
275
);
276
};
src/isomorphic/deprecated/cloneWithProps.js
+1
-1
@@ -47,7 +47,7 @@ function cloneWithProps(child, props) {
47
newProps.children = child.props.children;
48
}
49
50
- // The current API doesn't retain _owner and _context, which is why this
50
+ // The current API doesn't retain _owner, which is why this
51
// doesn't use ReactElement.cloneAndReplaceProps.
52
return ReactElement.createElement(child.type, newProps);
53
}
src/renderers/dom/shared/ReactDefaultInjection.js
-1
@@ -59,7 +59,6 @@ function autoGenerateWrapperClass(type) {
59
null, // key
60
null, // ref
61
internalInstance._currentElement._owner, // owner
62
- null, // context
62
this.props
63
);
64
}
src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
-1
@@ -400,7 +400,6 @@ describe('ReactDOMComponent', function() {
400
type: StubNativeComponent,
401
props: props,
402
_owner: null,
403
- _context: null
403
});
404
return stubComponent.mountComponent('test', transaction, {});
405
};