RxJS hook into Subject but don't need a value with Void Subject
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);
no comments