Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.


RxJS Subject pass value before subscribing

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

no comments

    sign in to comment