-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
featurePRs and issues for featuresPRs and issues for features
Description
It seems that the spawn function is not implemented in RxJS5. As such, I cannot yield to Observables.
Our use case is to retrieve paginated data from a web-server. This is my how I can do it in RxJS4:
Rx.Observable.spawn(function* () {
const limit = 2;
try {
const aprxjs = Rx.Observable.fromCallback(api);
const lazyArr = [];
yield aprxjs(0)
.expand(v => v < limit ? aprxjs(v) : Rx.Observable.empty())
.do(v => lazyArr.push(v));
}
catch (e) { console.log('er', e.stack); }
}).subscribe();
Metadata
Metadata
Assignees
Labels
featurePRs and issues for featuresPRs and issues for features