Created
June 29, 2017 14:18
-
-
Save ernestofreyreg/83aaf4e51d7a47b8a92ba5976012cccd 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 Counter extends React.Component { | |
state = { | |
count: 0 | |
} | |
increase = () => { | |
this.setState({count: this.state.count + 1}) | |
} | |
render () { | |
return <button onClick={this.increase}>{count}</button> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment