Angular · Senior · Question 50 of 75
What is the difference between a cold and a hot Observable?
- ✓Correct answer: Cold starts its producer per subscriber (like an HTTP call); hot shares one producer among subscribers (like a
Subjector DOM events) - 2Cold Observables are slower than hot ones
- 3Hot Observables can only emit once
Explanation
Operators like share and shareReplay turn a cold Observable into a multicast one. Knowing the difference explains duplicate requests and missed values.