Created
July 5, 2017 08:46
-
-
Save javarouka/0bfdd3ca56481aa0073310f68370d3a3 to your computer and use it in GitHub Desktop.
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
class Diff extends React.Component { | |
constructor(props) { | |
super(props); | |
this.name = "HaHa!" | |
} | |
handleArrow = () => { | |
console.log(this.name); | |
}; | |
handleNormal() { | |
console.log(this.name); | |
}; | |
render() { | |
return ( | |
<div> | |
{/* HaHa! */} | |
<button onClick={this.handleArrow}>handleArrow</button> | |
{/* throw error */} | |
<button onClick={this.handleNormal}>handleNormal</button> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment