I already know that
publish shares a single subscription and also returns a ConnectableObservable ( so we have to Connect(
shareReplay() is basically publishReplay().refCount()
Here is a great article explaingin just that in detail: "Angular Async Pipes - Beware the share"
Edit:
The right thing to say is:
shareReplay() is similar to publishReplay().refCount()
see @DevRok's answer for more info why they are not exactly the same.