I made my componentWillMount() async. Now I can using await with the setState.
componentWillMount()
await
setState
Here is the sample code:
compon
setState does not return a promise.
setState has a callback.
this.setState({ ...this.state, key: value, }, () => { //finished });