A single error can terminate your entire observable chain. Learn how placing `catchError` inside `switchMap` contains the blast and saves your stream.
#1about 8 minutes
Understanding the core concept of operators as wrappers
Observables can be visualized as a chain of wrapping operators, similar to Russian dolls, where each operator adds functionality to the one before it.
#2about 9 minutes
Live demo of the operator wrapper model
A code demonstration reveals how subscriptions propagate down the chain and values emit up, showing that observables can emit both synchronously and asynchronously.
#3about 4 minutes
The `toPromise` operator waits for observable completion
The `toPromise` operator doesn't resolve with the first emitted value but instead waits for the source observable to complete and resolves with the last value.
#4about 8 minutes
Comparing the `first` and `take(1)` operators
While `take(1)` safely completes on an empty stream, the `first` operator will throw an error if the source observable completes without emitting any values.
#5about 10 minutes
Choosing between `switchMap`, `concatMap`, and `mergeMap`
`switchMap` cancels previous inner observables, `concatMap` waits for them to complete sequentially, and `mergeMap` runs them all concurrently.
#6about 4 minutes
Keeping observable chains alive with `catchError`
Placing a `catchError` operator inside a higher-order mapping operator like `switchMap` prevents an inner observable's error from terminating the entire outer chain.
#7about 2 minutes
Combining streams with `combineLatest` and `withLatestFrom`
Both `combineLatest` and `withLatestFrom` require all source observables to emit at least once before they produce any output.
#8about 2 minutes
Managing subscriptions to prevent memory leaks
Use a parent `Subscription` object to group multiple child subscriptions, allowing you to unsubscribe from all of them at once to avoid memory leaks.
#9about 3 minutes
Recommended resources for learning RxJS
Key learning resources include the official RxJS documentation, interactive marble diagrams for visualizing operators, and content from core team members like Ben Lesh.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
09:17 MIN
Comparing signals with RxJS observables
Angular Signals: what's all the fuss about?
06:59 MIN
Create custom RxJS operators for cleaner data streams
Angular tips/tricks you can use from tomorrow on
03:46 MIN
How pipeable operators changed the RxJS API
How to Create New RxJS Operators
05:35 MIN
Recapping the reactive carousel implementation
Practice makes perfect - when it comes to RxJS
08:27 MIN
Exploring the core principles of reactive programming
Dev Digest 136 - No JS(on) of mineNews and ArticlesDouglas Crockford is our featured video, so let's talk about evolving JavaScript and all things JSON. Judicious JSON explains all the weird things in it, you can learn why it can be incredibly slow, people wonder what even is a JSON ...
Chris Heilmann
All the videos of Halfstack London 2024!Last month was Halfstack London, a conference about the web, JavaScript and half a dozen other things. We were there to deliver a talk, but also to record all the sessions and we're happy to share them with you. It took a bit as we had to wait for th...
Eli McGarvie
8 Great Tech Documentaries For DevelopersFor decades, developers have been starved of good tech films, we’ve been living on Steve Jobs biopics and Mark Zuckerberg remakes. Last time I checked, no one is interested in Facebook and its FED co-founder. Where are all the cool films that are act...
Anto Pranjić
11 Tips to Make The Most Out of Your First World Congress The world’s most awesome event for developers is taking place in less than a month! It’s been far too long since the last time we met in person, but that’s only going to make this year’s WeAreDevelopers World Congress a truly special experience. Conf...
From learning to earning
Jobs that call for the skills explored in this talk.