Skip to content

Instantly share code, notes, and snippets.

@cimfalab
Created July 19, 2017 09:27
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 cimfalab/f2b043b58e56aae1a01629be4c6c87ae to your computer and use it in GitHub Desktop.
Save cimfalab/f2b043b58e56aae1a01629be4c6c87ae to your computer and use it in GitHub Desktop.
react-3-handleClick
import React from 'react';
class Hello extends React.Component {
handleClick() {
console.log('clicked');
}
render() {
return (
<div onClick={this.handleClick}>
Hello
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment