React setState promise

Comes in handy _setStatePromise = state => { return new Promise(resolve => { this.setState(state, resolve) }) } use like so await this._setStatePromise({ key: value }) await doSomethingDependingOnThat() »