Last active
April 22, 2019 17:41
-
-
Save verdi327/fee271f4aa0746d6f9d6cd2f7042f288 to your computer and use it in GitHub Desktop.
js async/await
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
increment = async () => { | |
await this.setState({value: this.state.value + 1}) | |
this.setState({ | |
values: [...this.state.values, this.state.value] | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment