concatAll
signature: concatAll(): Observable
concatAll(): Observable
Collect observables and subscribe to next when previous completes.
:warning: Be wary of backpressure when the source emits at a faster pace than inner observables complete!
:bulb: In many cases you can use concatMap as a single operator instead!
Examples
( example tests )
Example 1: concatAll with observable
( StackBlitz | jsBin | jsFiddle )
Example 2: concatAll with promise
( StackBlitz | jsBin | jsFiddle )
Example 3: Delay while inner observables complete
( StackBlitz | jsBin | jsFiddle )
Related Recipes
Additional Resources
:newspaper: - Official docs
Flatten a higher order observable with concatAll in RxJS
:video_camera: :dollar: - André Staltz
:file_folder: Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/concatAll.ts
Last updated
Was this helpful?