- 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.
- Windows Vista基礎(chǔ)與應(yīng)用精品教程
- Windows Server 2012 Hyper-V:Deploying the Hyper-V Enterprise Server Virtualization Platform
- UNIX操作系統(tǒng)設(shè)計(jì)
- macOS效率手冊(cè)
- 嵌入式Linux應(yīng)用開(kāi)發(fā)菜鳥(niǎo)進(jìn)階
- Java EE 8 Design Patterns and Best Practices
- Linux系統(tǒng)安全基礎(chǔ):二進(jìn)制代碼安全性分析基礎(chǔ)與實(shí)踐
- AWS Development Essentials
- AutoCAD 2014中文版從入門到精通
- 完美應(yīng)用RHEL 8
- 從實(shí)踐中學(xué)習(xí)Kali Linux無(wú)線網(wǎng)絡(luò)滲透測(cè)試
- NetDevOps入門與實(shí)踐
- Linux系統(tǒng)最佳實(shí)踐工具:命令行技術(shù)
- Drupal 7 Cookbook
- Multi-Cloud for Architects