Skip to content

Instantly share code, notes, and snippets.

@androidfanatic
Created March 23, 2020 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save androidfanatic/982ffa6b1fb60cb71891ff73ae9825f7 to your computer and use it in GitHub Desktop.
Save androidfanatic/982ffa6b1fb60cb71891ff73ae9825f7 to your computer and use it in GitHub Desktop.
increaseCount = () => {
this.setState({ count: this.state.count + 1 });
};
render() {
return (
<div className="App">
<button onClick={this.increaseCount}>
COUNT ({this.state.count})
</button>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment