Closed pavadeli closed 6 years ago
Comparable to Derivable#toObservable, but returns a Promise. 🙄 Very useful to wait until a certain condition is met, for example:
Derivable#toObservable
Promise
class Sample { value$ = atom(0); ready$ = atom(false); async valueWhenReady(): Promise<number> { await this.value$.toPromise({ when: this.ready$ }); } }
Comparable to
Derivable#toObservable
, but returns aPromise
. 🙄 Very useful to wait until a certain condition is met, for example: