Recall & Review
beginner
What does mergeMap do in Angular RxJS?
mergeMap subscribes to all inner observables as they come and merges their outputs into one observable. It runs all inner streams concurrently.
Click to reveal answer
beginner
How does concatMap handle multiple inner observables?
concatMap queues inner observables and subscribes to them one by one. It waits for the current inner observable to complete before starting the next.
Click to reveal answer
intermediate
Explain exhaustMap behavior in Angular RxJS.
exhaustMap ignores new inner observables if one is already running. It only subscribes to the first inner observable and ignores others until it completes.
Click to reveal answer
intermediate
When should you use concatMap instead of mergeMap?
Use concatMap when order matters and you want to process inner observables one at a time, avoiding concurrency.
Click to reveal answer
intermediate
What is a real-life example for using exhaustMap?
exhaustMap is useful for ignoring repeated button clicks that trigger HTTP requests until the first request finishes, preventing duplicate calls.
Click to reveal answer
Which operator runs all inner observables at the same time?
✗ Incorrect
mergeMap subscribes to all inner observables concurrently, merging their outputs.
Which operator queues inner observables and runs them one after another?
✗ Incorrect
concatMap waits for each inner observable to complete before starting the next.
Which operator ignores new inner observables if one is already active?
✗ Incorrect
exhaustMap ignores new inner observables until the current one completes.
If you want to prevent multiple HTTP calls from rapid clicks, which operator is best?
✗ Incorrect
exhaustMap ignores new triggers while the first HTTP call is running.
Which operator preserves the order of inner observables?
✗ Incorrect
concatMap processes inner observables sequentially, preserving order.
Describe the main difference between mergeMap, concatMap, and exhaustMap in Angular RxJS.
Think about how each operator handles multiple inner streams.
You got /3 concepts.
Give an example scenario where using exhaustMap is better than mergeMap or concatMap.
Consider user actions that should not trigger repeated processes.
You got /3 concepts.