I've been learning RxJs for a couple of weeks now and I can't seem to understand what exactly is the differences between Subjects and Multicasting an observable.
I found many sources that differentiate observables with subjects, but I couldn't find any source that differentiated Subjects with Multicasting-Observables
As per my understanding...
Multicasting: allow side-effects to be shared among multiple subscribers.
Subjects: is an Observable which shares a single execution path among observers.
My questions are:
- What is the difference if both do the same thing?
- When should you use a Subject?
- When should you use multicasting?