withLatestFrom
signature: withLatestFrom(other: Observable, project: Function): Observable
withLatestFrom(other: Observable, project: Function): Observable
Also provide the last value from another observable.
:bulb: If you want the last emission any time a variable number of observables emits, try combinelatest!
Examples
Example 1: Latest value from quicker second source
( StackBlitz | jsBin | jsFiddle )
Example 2: Slower second source
( StackBlitz | jsBin | jsFiddle )
Related Recipes
Additional Resources
:newspaper: - Official docs
Combination operator: withLatestFrom
:video_camera: :dollar: - André Staltz
:file_folder: Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/withLatestFrom.ts
Last updated