Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Commit

Permalink
Add methods passed to createClass to the new class' prototype (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishinrichs authored and developit committed Dec 8, 2016
1 parent 624c1e2 commit f27a9c3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ function createClass(obj) {
let mixins = obj.mixins && collateMixins(obj.mixins);

function cl(props, context) {
extend(this, obj);
if (mixins) applyMixins(this, mixins);
bindAll(this);
Component.call(this, props, context, BYPASS_HOOK);
Expand All @@ -392,8 +391,7 @@ function createClass(obj) {
}

F.prototype = Component.prototype;
cl.prototype = new F();
cl.prototype.constructor = cl;
cl.prototype = extend(new F(), extend({ constructor: cl }, obj));

cl.displayName = obj.displayName || 'Component';

Expand Down

0 comments on commit f27a9c3

Please sign in to comment.