Skip to content

Instantly share code, notes, and snippets.

@asfktz
Created August 9, 2016 12: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 asfktz/3e927982d91a3a078ef9b91c52c02ad2 to your computer and use it in GitHub Desktop.
Save asfktz/3e927982d91a3a078ef9b91c52c02ad2 to your computer and use it in GitHub Desktop.
class Button extends React.Component {
constructor (props) {
super(props)
this.handleClick = this.handleClick.bind(this)
}
handleClick () {
console.log(this)
}
render () {
return (
<div onClick={this.handleClick}>
Click
</div>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment