useEffect(() => { this.stream .pipe(map(selector), takeUntil(unsubscribe$)) .subscribe(setValue); return () => { unsubscribe$.next(); unsubscribe$.complete(); }; // eslint-disable-next-line react-hooks/exhaustive-deps }, []);
ngOnDestroy() { this._onDestroy.next(); this._onDestroy.complete(); }
export function getProducts(page) { const subject = new Subject(); setTimeout(() => { subject.next(generateProducts()); subject.complete(); }, 1000); return subject; }
ngOnDestroy() { this.ngUnsubscribe$.next(); this.ngUnsubscribe$.complete(); }
private stopPolling() { this.alarmsPolling = 0; this.destroy.next(); this.destroy.complete(); }
ngOnDestroy() { this.ngUnsubscribe$.next(); this.ngUnsubscribe$.complete(); }
useEffect(() => { this.stream .pipe(map(selector), takeUntil(unsubscribe$)) .subscribe(setValue); return () => { unsubscribe$.next(); unsubscribe$.complete(); }; // eslint-disable-next-line react-hooks/exhaustive-deps }, []);
ngOnDestroy() { this._onDestroy.next(); this._onDestroy.complete(); }
ngOnDestroy() { this._onDestroy.next(); this._onDestroy.complete(); }
ngOnDestroy() { this._onDestroy.next(); this._onDestroy.complete(); }