RxJS hook into Subject but don't need a value with Void Subject

node v14.18.3
version: 1.0.0
endpointsharetweet
const rxjs = require('rxjs'); const { Subject } = rxjs const subject = new Subject(); // Shorthand for Subject<void> subject.subscribe({ next: () => console.log('One second has passed') }); setTimeout(() => subject.next(), 1000);
Loading…

no comments

    sign in to comment