-
-
Save reddyonrails/aa15ed29ed7e1a28deedd72c29556f19 to your computer and use it in GitHub Desktop.
Revisions
-
sebmarkbage revised this gist
Feb 11, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,6 +14,8 @@ var Bar2 = base => class extends base { class Foo extends mixins(Bar1, Bar2) { componentWillMount() { console.log('Foo before mixins'); super.componentWillMount(); console.log('Foo after mixins'); } } -
sebmarkbage revised this gist
Feb 11, 2015 . 1 changed file with 10 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,15 @@ var Bar1 = base => class extends base { componentWillMount(){ super.componentWillMount(); console.log('Bar1'); } }; var Bar2 = base => class extends base { componentWillMount(){ super.componentWillMount(); console.log('Bar2'); } }; class Foo extends mixins(Bar1, Bar2) { -
sebmarkbage revised this gist
Feb 11, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ function mixins(...mixinFactories) { var base = class {}; // TODO: Add all possible method names that might call super() // to the base class so that they don't throw. for (var i = 0; i < mixinFactories.length; i++) { base = mixinFactories[i](base); } -
sebmarkbage revised this gist
Feb 11, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ var Bar1 = function (base) { return class extends base { componentWillMount(){ super.componentWillMount(); console.log('Bar1'); } }; @@ -10,14 +10,14 @@ var Bar1 = function (base) { var Bar2 = function (base) { return class extends base { componentWillMount(){ super.componentWillMount(); console.log('Bar2'); } }; }; class Foo extends mixins(Bar1, Bar2) { componentWillMount() { super.componentWillMount(); } } -
sebmarkbage revised this gist
Feb 11, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ function mixins(...mixinFactories) { var base = class {}; // TODO: Add all possible methods that might call super() to the base class so that they don't throw. for (var i = 0; i < mixinFactories.length; i++) { base = mixinFactories[i](base); } -
sebmarkbage revised this gist
Feb 11, 2015 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ function mixins(...mixinFactories) { var base = class {}; for (var i = 0; i < mixinFactories.length; i++) { base = mixinFactories[i](base); } return base; } -
sebmarkbage created this gist
Feb 11, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ var Bar1 = function (base) { return class extends base { componentWillMount(){ super(); console.log('Bar1'); } }; }; var Bar2 = function (base) { return class extends base { componentWillMount(){ super(); console.log('Bar2'); } }; }; class Foo extends mixins(Bar1, Bar2) { componentWillMount() { super(); } }