RxJS. Transformation Operators in Examples (part 1)
Examples of
buffer
,bufferCount
,bufferTime
,bufferToggle
,bufferWhen
,concatMap
,concatMapTo
,exaust
,exaustMap
andexpand
RxJS Transformation operators (part 1).
This article is a continuation of RxJS Basics in Examples.
RxJS. Transformation Operators in Examples (part 2): map
, mapTo
, mergeMap
, mergeMapTo
, scan
, mergeScan
, groupBy
, pairwise
, partition
, pluck
, switchMap
, switchMapTo
, window
, windowCount
, windowTime
, windowToggle
, andwindowWhen
operators.
What are operators?
Operators are functions. There are two kinds of operators:
Pipeable Operators are the kind that can be piped to Observables using the syntax observable$.pipe(someOperator())
. When called, they do not change the existing Observable instance, instead, they return a new Observable, whose subscription logic is based on the first Observable.
“A Pipeable Operator is a function that takes an Observable as its input and returns another Observable. It is a pure operation: the previous Observable stays unmodified. “
— official documentation