Skip to content

Transformation Operators

Transformation operators are used to transform and process data within the RxJS pipeline. By transforming values into new forms, they allow for more flexible and powerful control over reactive data flow.

List of Operators

◾ Simple Value Transformations

OperatorDescription
mapApply a transformation function to each value

◾ Accumulation

OperatorDescription
scanCumulatively generate values
reduceOutput only the final accumulated result

◾ Pair and Grouping

OperatorDescription
pairwiseProcess two consecutive values in pairs
groupByGroup values based on a key

◾ Asynchronous Transformation

OperatorDescription
mergeMapTransform each value into an Observable and merge in parallel
switchMapSwitch to the latest Observable
concatMapExecute each Observable sequentially
exhaustMapIgnore new inputs while executing
expandRecursively expand results

◾ Batch Processing

OperatorDescription
bufferBatch values at the timing of another Observable
bufferTimeBatch values at regular intervals
bufferCountBatch values by specified count
bufferWhenBuffering with dynamically controlled end conditions
bufferToggleBuffering with independent control of start and end
windowTimeSplit into sub-Observables at regular intervals

Practical Transformation Patterns

In real-world applications, the following processing is possible by combining transformation operators:

  • Input validation and feedback
  • Optimal control of asynchronous API requests
  • Data shaping, aggregation, and normalization
  • Batch processing and grouping of event streams

👉 For more information: Practical Transformation Patterns

🚨 Notes

To avoid common mistakes when using transformation operators, see also:

Released under the CC-BY-4.0 license.