Collect, Combine, and Cache RxJS Streams for User-Friendly Results...
summary
Shows how to build a product-list/detail UI that emits no manual subscriptions and therefore needs no manual unsubscriptions, turning HTTP GETs into observable properties and using the async pipe with onPush for fewer change-detection runs. Maps product category IDs to names via combineLatest with a category lookup, resolves supplier ID arrays with parallel mergeMap requests, uses a Subject for selection actions, caches results with shareReplay, and demonstrates a combined VM$ that updates correctly and performs better.
AI-written summary · about
chapters (8)
- 0:00Introduction to RxJS streams
- 1:12Collecting data declaratively
- 6:33Combining streams with combineLatest
- 13:27Higher-order observables explained
- 19:35Reacting to user actions
- 25:16Caching data with shareReplay
- 27:03Merging all observables
- 30:36Pros and cons of RxJS approach
related talks
34mCollect, Combine and Cache RxJS Streams for User-Friendly Results
21mData Composition with RxJS
21mRxJS Best Practices Aren't Always Black and White
33mStop Micromanaging State and Start Being Reactive
47mCool RxJS Tricks
28mReactive all the Things
06mThe Cleanest Way to Write Observable Chains
25mReinventing RxJS
