Last active
January 29, 2016 00:12
-
-
Save cacheflow/163f07e544d5a91f8ece to your computer and use it in GitHub Desktop.
This file contains hidden or 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 MainComponent { | |
constructor() { | |
super(); | |
this.state = { | |
clicked: false | |
} | |
this._bind('doSomething') | |
} | |
doSomething() { | |
this.setState({clicked: true}); | |
console.log("state of clicked is", this.state.clicked) | |
} | |
render() { | |
return ( | |
<div> | |
<button onClick={this.doSomething}> click me </button> | |
</div> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment