Created
August 16, 2017 08:36
-
-
Save AkshayRana92/20f5d6a9a9b52ccb910de68529cd6550 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 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