RxJS send last value to subscribers with AsyncSubject

node v14.18.3
version: 1.0.0
endpointsharetweet
const rxjs = require('rxjs'); const { AsyncSubject } = rxjs const subject = new AsyncSubject(); subject.subscribe({ next: (v) => console.log(`observerA: ${v}`) }); subject.next(1); subject.next(2); subject.next(3); subject.next(4); subject.subscribe({ next: (v) => console.log(`observerB: ${v}`) }); subject.next(5); subject.complete();
Loading…

no comments

    sign in to comment