Skip to content

Instantly share code, notes, and snippets.

@jquense
Created March 11, 2015 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jquense/69a7a9d1b2551186f9f3 to your computer and use it in GitHub Desktop.
Save jquense/69a7a9d1b2551186f9f3 to your computer and use it in GitHub Desktop.
React mixin thing
function mixin(){
var privatevar = 5;
this.on('componentWillMount', () =>{
//stuff
})
this.mixinMethod = () => {
return privatevar;
}
}
class App extends React.Component {
constructor(props, context){
super()
mixin.call(this)
}
render(){
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment