- Mastering Reactive JavaScript
- Erich de Souza Oliveira
- 137字
- 2021-07-09 20:33:11
Hot and cold observables
In bacon.js, an observable only emits a value when a subscriber subscribes to it; therefore, we will call it a cold observables. In Reactive Extensions, things can become a little trickier: we have both hot and cold observables.
A hot observable is an observable that propagates the data independently, irrespective of whether we have some Observer attached to it or not. An example of a hot observable is an observable created from mouse movements.
A cold observable, on the other hand, is an observable that fires the same sequence for all the subscribers. An example of a cold observable is an observable created from an array.
This behavior is important to understand, and RxJS has special methods to replay events in a hot observable or turn a cold observable into a hot observable.
- Mastering vRealize Operations Manager(Second Edition)
- Cybersecurity:Attack and Defense Strategies
- Puppet實戰(zhàn)
- 大學(xué)計算機應(yīng)用基礎(chǔ)實踐教程(Windows 7+Office 2013)
- 無蘋果不生活 OS X Mountain Lion隨身寶典
- WindowsServer2012Hyper-V虛擬化部署與管理指南
- 曝光:Linux企業(yè)運維實戰(zhàn)
- SOA實踐者說
- 數(shù)據(jù)中心系統(tǒng)工程及應(yīng)用
- Linux自動化運維:Shell與Ansible(微課版)
- OpenSolaris設(shè)備驅(qū)動原理與開發(fā)
- Learning BeagleBone
- Advanced Infrastructure Penetration Testing
- Web Penetration Testing with Kali Linux(Third Edition)
- Java EE 7 Developer Handbook