What are common RxJS operators you use, and what do they do?
Model answer
map transforms each value, filter drops values, tap runs a side effect without changing values, debounceTime waits for a pause, distinctUntilChanged skips repeated values, catchError handles errors, combineLatest and forkJoin combine streams, and switchMap, mergeMap, concatMap and exhaustMap map a value to another Observable in different ways.
Show that you know when to use each rather than listing them: for example switchMap for search as you type, because it cancels the previous request.
Learn this topic
Angular Tutorial: Beginner to Advanced .
Sign in to add your own answer.
More questions
- How do you call an API in Angular?
- What is an Observable, and how is it different from a Promise?
- What is the difference between subscribe and the async pipe?
- Explain the difference between switchMap, mergeMap, concatMap and exhaustMap.
- What are HTTP interceptors, and what are they used for?
- How do you handle errors from HTTP calls?