Skip to content

Instantly share code, notes, and snippets.

@AkshayRana92
Created August 16, 2017 08:36
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 AkshayRana92/20f5d6a9a9b52ccb910de68529cd6550 to your computer and use it in GitHub Desktop.
Save AkshayRana92/20f5d6a9a9b52ccb910de68529cd6550 to your computer and use it in GitHub Desktop.
class Child extends Component {
constructor() {
super();
}
handleChangeEvent() {
this.props.onNameChange('Heisenberg')
}
render() {
return (
<div>
<h1>{this.props.name}</h1>
<button onClick={this.handleChangeEvent.bind(this)}> update </button>
</div>
);
}
}
export default Child;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment