Angular · Senior · Question 52 of 75

What is the risk of shareReplay(1) without refCount: true on a long-lived source?

Explanation

shareReplay({ bufferSize: 1, refCount: true }) unsubscribes from the source when the subscriber count drops to zero. For one-shot HTTP calls it matters less.

Further reading

Problem with a question

Angular · Senior · question 52

Test yourself

Take the Angular · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz