1
約束を返し、解決された値の変化を検出する関数をポーリングしたいと考えています。私は何とかここにinterval
演算子を追加する必要があります。約束の値の変化を検出する方法は?
const observer = (newValue) => {
console.log('Change detected', newValue);
}
Observable.fromPromise(getValue())
.distinctUntilChanged((oldValue, newValue) => oldValue == newValue)
.subscribe(observer);
の典型的なケース私はバディ、あなたを愛して! –