Skip to content

Utility Operators

Utility operators in RxJS are a group of operators that are responsible for auxiliary processing of streams (side effects, state control, UI support, etc.) rather than the main purpose of data conversion or filtering.

On this page, operators are categorized by purpose as shown below, and a list is provided to confirm their basic usage. For detailed usage and practical examples, please refer to the respective pages or Practical Use Cases.

List of Operators (by Purpose)

◾ Side Effects and State Control

OperatorDescriptionOften Combined With
tapExecute side effects without changing values (log output, UI updates, etc.)map, switchMap
finalizeExecute cleanup processing when the stream endstap, catchError

◾ Timing and Delay Control

OperatorDescriptionOften Combined With
delayDelay the emission of each value by a specified timetap, concatMap
timeoutGenerate an error if emission exceeds a certain timecatchError, retry
takeUntilEnd subscription when the specified Observable notifiesinterval, fromEvent

◾ Initial Value, Repetition, Array Conversion, etc.

OperatorDescriptionOften Combined With
startWithEmit an initial value at the beginning of the streamscan, combineLatest
repeatResubscribe to the entire stream after completiontap, delay
retryRetry on errorcatchError, switchMap
toArrayEmit all values in the stream as a single array (on completion)concatMap, take

Remarks

  • Difference between retry and repeat:
    • retry: Retry on error
    • repeat: Retry on successful completion
  • toArray does not output a value unless it completes, so it is commonly used with take() and so on.

Released under the CC-BY-4.0 license.