How to use the race function from rxjs

Find comprehensive JavaScript rxjs.race code examples handpicked from public code repositorys.

59
60
61
62
63
64
65
66
67
68
exports.never = rxjs.never;
exports.of = rxjs.of;
exports.onErrorResumeNext = rxjs.onErrorResumeNext;
exports.pairs = rxjs.pairs;
exports.partition = rxjs.partition;
exports.race = rxjs.race;
exports.range = rxjs.range;
exports.throwError = rxjs.throwError;
exports.timer = rxjs.timer;
exports.using = rxjs.using;
fork icon299
star icon0
watch icon1

14
15
16
17
18
19
20
21
22
23


const a$ = timer(10).pipe(mapTo('a'));
const b$ = timer(5, 5).pipe(take(3));

const result$ = race([ a$, b$ ]);

a$.subscribe(rxObserver('a$'));
b$.subscribe(rxObserver('b$'));
result$.subscribe(rxObserver('race(a$, b$)'));
fork icon10
star icon0
watch icon1

+ 3 other calls in file