Created
July 26, 2014 03:20
-
-
Save jaredly/8fc3195038e606411777 to your computer and use it in GitHub Desktop.
mixin factories
This file contains 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 characters
var MyMixin = require('my-mixin') | |
// way one | |
var App = React.createClass({ | |
mixins: [MyMixin], | |
stuffForMyMixin: { | |
aVariable: 12, | |
aFunction: function () { | |
// etc. | |
} | |
} | |
}) | |
// way two | |
var App = React.createClass({ | |
mixins: [MyMixin({ | |
aVariable: 12, | |
aFunction: function () { | |
// etc. | |
} | |
})] | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment