Chapter 5. Applied reactive streams
This chapter covers
- Handling multiple observable sequences with one subscription
- Learning to make observable streams conformant
- Flattening nested observables structures
- Merging a collection of observables into a single output
- Preserving sequence order with concatenation
- Implementing real-world problems: search box, live stock ticker, and drag and drop
In the previous chapter, we firmly rooted the notion that an observable is a sequence of events over time. You can think about it as the orchestrator or channel through which events are pushed and transformed. So far, we’ve discussed how to process observable sequences in isolation for the most part, and you learned how you could apply familiar operators over all the elements within an observable in the same way that you could with an array, irrespective of when those elements were emitted. Toward the end of the chapter, we briefly gave you some exposure to an RxJS operator called combineLatest(), which is used to combine streams. The reason for these discussions is that other than trivial examples, most of your programming tasks will involve the use of these operators so that the events from one stream propagate and cause a reaction somewhere else. This is where RxJS and the entire reactive paradigm begin to shine and set themselves superior to other conventional asynchronous libraries.