Created
March 20, 2017 14:51
-
-
Save john1jan/00e8f157ea45383aa5183795e22d7e4c to your computer and use it in GitHub Desktop.
ES6Sample
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 App extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { message: 'Hello World' }; | |
} | |
render() { | |
return <div> | |
<p> Binding Revealed</p> | |
<input type="button" value="Print" onClick={this.print} /> | |
<Sample /> | |
</div> | |
} | |
print() { | |
console.log(this.state.message); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment