Last active
February 19, 2020 10:15
-
-
Save leopard627/b8586882167a3b9124e112995b6b46f6 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
increaseCount = () => { | |
const { count } = this.state; | |
this.setState({ | |
count: count + 1, | |
}); | |
}; | |
increaseCount = () => { | |
this.setState(({ count }) => ({ count: count + 1})); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment