Skip to content

Instantly share code, notes, and snippets.

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