Skip to content

Instantly share code, notes, and snippets.

@verdi327
Last active April 22, 2019 17:41
Show Gist options
  • Save verdi327/fee271f4aa0746d6f9d6cd2f7042f288 to your computer and use it in GitHub Desktop.
Save verdi327/fee271f4aa0746d6f9d6cd2f7042f288 to your computer and use it in GitHub Desktop.
js async/await
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