Subscriptions subscribe to an Observable and observers.
We need to subscribe to an observable to see its values.
Every created subscription will have a new execution context. This means, multiple event listeners are created:
const clickObservable$ = fromEvent(myBtn, 'click');
clickObservable$.subscribe((event) => {
console.log("clicked");
})
secondClickObservable$.subscribe((event) => {
console.log("clicked");
})
Subscribers
Subscribers implement the Observer interface and extend the Subscription class.