Pattern for shareReplay(1) in RxJS5
<p>I've started playing with RxJS5, and now see that there is no longer a <code>shareReplay</code> method.</p>

<p>It's quite possible that I often misused <code>shareReplay</code> in RxJS4, but now I'm struggling to get the behaviour that I want, i.e:</p>

<ul>
<li>Create an observable</li>
<li>Subscribe to the observable, and the observable produces a value</li>
<li>Subscribe to the observable a second time, and I get the same first value</li>
<li>Observable produces a second value, and both subscriptions get the second value</li>
</ul>

<p>How do I implement this with RxJS5?</p>

<p>In general I think I understand the RxJS operators quite well, but the whole cold, hot, publish, connect is rather unclear to me. Is there a good reference that shows how to find what kind of observable I have, so that I can find out in a logical manner why a subscribe is not getting values, or why an observable is being executed multiples times?</p>

<p><strong>EDIT</strong></p>

<p>Happy news, shareReplay() is back in RxJS 5.4.0:</p>

<p>Changelog: <a href="https://github.com/ReactiveX/rxjs/blob/892700dd4f5d5e5f9ae9276ede32208f4390c5e9/CHANGELOG.md#540-2017-05-09" rel="nofollow noreferrer">https://github.com/ReactiveX/rxjs/blob/892700dd4f5d5e5f9ae9276ede32208f4390c5e9/CHANGELOG.md#540-2017-05-09</a></p>

<p>Barebones documentation: <a href="http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html#instance-method-shareReplay" rel="nofollow noreferrer">http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html#instance-method-shareReplay</a></p>