RxJS Best Practices Aren't Always Black and White
summary
Declares an action stream with a private Subject or BehaviorSubject and emits user selections to drive HTTP calls, uses switchMap for latest only when cancelling previous requests (typeahead or rapid selection), chooses concatMap when order matters for sequential writes, and uses forkJoin for HTTP one-and-done vs combineLatest or zip for different join semantics. Recommends async pipe to avoid manual unsubscribe, use higher‑order mapping operators instead of nested subscriptions, and catchError returning an observable that preserves the outer stream type.
AI-written summary · about
chapters (6)
- 0:00Start
- 0:47Deborah Kurata
- 1:21Procedural vs Declarative
- 2:03Benefits
- 4:37Declare an Action Stream
- 5:43React to the Notification
related talks
34mCollect, Combine and Cache RxJS Streams for User-Friendly Results
19mRxJS Patterns in Angular
31mCollect, Combine, and Cache RxJS Streams for User-Friendly Results...
58mAngular and The Case for RxJS
36mRxJS: A Better Way to Write Frontend Applications
21mRxJS: The Good Parts
32mMastering Reactive Programming with RxJS
22mMastering the Subject: Communication Options in RxJS
