Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
mixin factories
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