Skip to content

Instantly share code, notes, and snippets.

@bcomnes
Created August 4, 2016 22:35
Show Gist options
  • Select an option

  • Save bcomnes/c910b88c4b51a7bca9c62c6ac14a7d0e to your computer and use it in GitHub Desktop.

Select an option

Save bcomnes/c910b88c4b51a7bca9c62c6ac14a7d0e to your computer and use it in GitHub Desktop.
class ReactComponent extends Component {
constructor (props) {
super(props)
this.classMethod = this.classMethod.bind(this)
}
classMethod () {
// do soemthing with 'this'
}
render () {
<AnotherComponent onChange={this.classMethod}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment