Basic RxJS Subject

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

no comments

    sign in to comment