Skip to content

Instantly share code, notes, and snippets.

@evanscottgray
Created October 13, 2015 06:32
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 evanscottgray/c902f4a84253584adb52 to your computer and use it in GitHub Desktop.
Save evanscottgray/c902f4a84253584adb52 to your computer and use it in GitHub Desktop.
class ExampleComponent extends React.Component {
constructor() {
super();
this. _handleClick = this. _handleClick.bind(this);
}
render() {
return <div onClick={this._handleClick}>Hello, world.</div>;
}
_handleClick() {
console.log(this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment