Found 1 bookmarks
Newest
To Use Subject Or Not To Use Subject?
To Use Subject Or Not To Use Subject?
Subscribing a subject to a cold observable broadcasts its notifications to multiple observers, thus making it hot. Woah, so this is what multi casting is about! So it’s clear there are only two scenarios where it’s correct to use subjects: - The source is external and cold, and I want a hot observable. - The source is local and I want a hot observable. use either `Defer` or `Publish` to change the temperature accordingly That’s where `Publish` is useful, as described earlier in this post. `Publish` converts a cold observable into a hot observable; however, it returns `IConnectableObservable`, which requires a call to `Connect`.
·davesexton.com·
To Use Subject Or Not To Use Subject?