Also, if you provide the ‘publishReplay’ operator a second argument, which is time in ms, it will…
Armen Vardanyan

These are both decent solutions. For the one you reassign the property, you might want to trigger the first one to complete first so it’s disposed properly. This may not be an issue, but I don’t know enough about Rxjs to know what happens.

Any attached subscriptions may just live on and cause a memory leak, but I don’t know for sure.

Show your support

Clapping shows how much you appreciated Dave Bosley’s story.