Transformation Operators
Use map, switchMap, mergeMap, and concatMap.
What are operators
Operators are functions you compose inside .pipe() to transform a stream. Transformation operators change each emitted value or flatten inner observables into the output.
map
map transforms each emitted value, like Array.map but over time.
import { of, map } from 'rxjs';
of(1, 2, 3).pipe(
map(n => n * 10)
).subscribe(v => console.log(v)); // 10, 20, 30All lessons in this course
- Transformation Operators
- Filtering Operators
- Combination Operators
- Error Handling Operators