Skip to content

Instantly share code, notes, and snippets.

@johnnyji
Last active January 16, 2018 22:17
Show Gist options
  • Save johnnyji/5ae9143730cffc88abb357d7c65c174a to your computer and use it in GitHub Desktop.
Save johnnyji/5ae9143730cffc88abb357d7c65c174a to your computer and use it in GitHub Desktop.
// ...
render() {
return (
<div>
<Button
label='Click me to increment!'
onClicked={this._handleIncrementView}
/>
<Button
label='Click me to decrement!'
onClicked={this._handleDecrementView}
/>
</div>
);
}
_handleIncrementCount = () => {
this.setState({count: this.state.count + 1});
};
_handleDecrementCount = () => {
this.setState({count: this.state.count - 1});
};
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment