Skip to content

Instantly share code, notes, and snippets.

@javarouka
Created July 5, 2017 08:46
Show Gist options
  • Save javarouka/0bfdd3ca56481aa0073310f68370d3a3 to your computer and use it in GitHub Desktop.
Save javarouka/0bfdd3ca56481aa0073310f68370d3a3 to your computer and use it in GitHub Desktop.
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