Last active
September 30, 2018 04:12
-
-
Save StevenJL/df910894e7697a22d12e7e7155328aaf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class ButtonComponent extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
message: 'Invoked from inside an anonymous function!', | |
} | |
} | |
handleClick() { | |
console.log(this.state.message) | |
} | |
render() { | |
return | |
< button onClick={() => this.handleClick()} /> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment