Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 577ae64

Browse files
committed
5
1 parent 27169e5 commit 577ae64

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/createClassInternalHack.re

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ let emptyObject = Js.Obj.empty ();
66
77
var _invariant = require('fbjs/lib/invariant');
88
9-
var MIXINS_KEY = 'mixins';
10-
119
// Helper function to allow the creation of anonymous functions which do not
1210
// have .name set to the name of the variable being assigned to.
1311
function identity(fn) {
@@ -291,13 +289,6 @@ function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
291289
displayName: function(Constructor, displayName) {
292290
Constructor.displayName = displayName;
293291
},
294-
mixins: function(Constructor, mixins) {
295-
if (mixins) {
296-
for (var i = 0; i < mixins.length; i++) {
297-
mixSpecIntoComponent(Constructor, mixins[i]);
298-
}
299-
}
300-
},
301292
childContextTypes: function(Constructor, childContextTypes) {
302293
Constructor.childContextTypes = _assign(
303294
{},
@@ -384,23 +375,11 @@ function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
384375
var proto = Constructor.prototype;
385376
var autoBindPairs = proto.__reactAutoBindPairs;
386377
387-
// By handling mixins before any other properties, we ensure the same
388-
// chaining order is applied to methods with DEFINE_MANY policy, whether
389-
// mixins are listed before or after these methods in the spec.
390-
if (spec.hasOwnProperty(MIXINS_KEY)) {
391-
RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
392-
}
393-
394378
for (var name in spec) {
395379
if (!spec.hasOwnProperty(name)) {
396380
continue;
397381
}
398382
399-
if (name === MIXINS_KEY) {
400-
// We have already handled mixins in a special case above.
401-
continue;
402-
}
403-
404383
var property = spec[name];
405384
var isAlreadyDefined = proto.hasOwnProperty(name);
406385
validateMethodOverride(isAlreadyDefined, name);

0 commit comments

Comments
 (0)