Created
July 19, 2017 09:27
-
-
Save cimfalab/f2b043b58e56aae1a01629be4c6c87ae to your computer and use it in GitHub Desktop.
react-3-handleClick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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