Load Data from an Array of ids with Observable.forkJoin in RxJS

InstructorJohn Lindquist

Share this video with your friends

Send Tweet

A common scenario when loading data is to load an initial array of ids then load each object associated with that id. The result you really want from that scenario is a simple array containing all the loaded objects. Observable.forkJoin allows you to pass in an Array of Observables (such as Observable.ajax requests) and then forkJoin will wait for each Obeservable to complete then resolve them back into a simple Array for you.

glen
~ 7 years ago

Thank you, I finally understand how to use forkJoin

Sung Kim
~ 5 years ago

Thank you, John. This is exactly how I'd use Egghead to learn.