race
signature: race(): Observable
Example 1: race with 4 observables
Example 2: race with an error
import { of } from 'rxjs/observable/of';
import { race } from 'rxjs/observable/race';
//Throws an error and ignores the other observables.
const first = of('first').pipe(
delay(100),
})
);
const second = of('second').pipe(delay(200));
const third = of('third').pipe(delay(300));
Additional Resources
- race
- Official docs