concat
signature: concat(observables: ...*): Observable
concat(observables: ...*): Observable
Subscribe to observables in order as previous completes
:bulb: You can think of concat like a line at a ATM, the next transaction (subscription) cannot start until the previous completes!
:bulb: If throughput, not order, is a primary concern, try merge instead!
Examples
Example 1: Basic concat usage with three observables
( StackBlitz )
Example 2: Display message using concat with delayed observables
( StackBlitz )
Example 3: (Warning!) concat with source that does not complete
( StackBlitz )
Related Recipes
Additional Resources
concat :newspaper: - Official
docs
Combination operator: concat, startWith
:video_camera: :dollar: - André Staltz
:file_folder: Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/concat.ts
Last updated