List of the most used RxJS operators and Observable creators (at least from my experience) and description. Images were taken from rxjs-visualize.
Emits its last value on completion.
Requires an initial value and emits the current value to new subscribers.
“Replays” or emits old values to new subscribers.
ReplaySubject
has an internal buffer that will store a specified number of values that it has observed.
A special type of Observable which shares a single execution path among observers.
Every Subject is an Observable and an Observer.
Accepts an Array of ObservableInput or a dictionary Object of ObservableInput and returns an Observable that emits either an array of values in the exact same order as the passed array, or a dictionary of values in the same shape as the passed dictionary.
forkJoin
does not emit until all source Observables complete. Once that happens, it emits once: an array of the last values that were emitted by the source Observables.
Create an observable that combines the latest values from all passed observables and the source into arrays and emits them.
This operator is best used when you have multiple, long-lived observables that rely on each other for some calculation or determination.
combineLatestWith
will not emit an initial value until each observable emits at least one value.
Emits all of the values from the source observable, then, once it completes, subscribes to each observable source provided, one at a time, emitting all of their values, and not subscribing to the next one until it completes.
This operator will sequentially emit the Observable given as input and proceed to the next one.
Merge the values from all observables to an single observable result.
Subscribes to the source, and the observable inputs provided as arguments, and combines their values, by index, into arrays.
zip
will only emit when all of its sources have emitted since the last time zip emitted.
Projects each source value to an Observable which is merged in the output Observable, in a serialized fashion waiting for each one to complete before merging the next.
Applies a given project function to each value emitted by the source Observable, and emits the resulting values as an Observable.
Projects each source value to an Observable which is merged in the output Observable.
mergeMap
allows for multiple inner subscriptions to be active at a time.
Projects each source value to an Observable which is merged in the output Observable, emitting values only from the most recently projected Observable.
Emits a notification from the source Observable only after a particular time span determined by another Observable has passed without another source emission.
Filter items emitted by the source Observable by only emitting those that satisfy a specified predicate.
Emits only the first count
values emitted by the source Observable.
Emits only the first value emitted by the source Observable that meets some condition.
Used to perform side-effects for notifications from the source observable. Mostly used for debugging.
Catches errors on the observable to be handled by returning a new observable or throwing an error.
This operator will take care of retrying back on the source Observable if there is error and the retry will be done based on the input count given.