I have a service which returns data in pages. The response to one page contains details on how to query for the next page.  My approach is to return the response data and then immediately concat a deferred call to the same observable sequence if ther...
Why doesn't the flatMap cause downstream reductions to fire?  I got code like:  handleFiles.flatMap(files =>   Rx.Observable.from(files).   flatMap((file, i) => fileReader(file, i)).   reduce((form, file, i) => {     form.append('fil...
Following up on How to structure rxjs code, concerning how to structure a widget with subwidget when using rx, how would you structure rx code where the subwidgets are data-driven?  As a toy problem, suppose you have an external source (e.g. web serv...
RxJs stops listening to click events when an inner observable errors (Ajax request). I'm trying to figure out how to keep the event listener hooked to the button click event and gracefully handle the inner ajax error.  Here is my example code and...
How do I import in GHCJS a Javascript function like the following ?  xs.subscribe(function(x) { console.log(x) })   I tried various combinations of the following without success:  data Observable_ data Disposable_  type Observable a = JSRef Observabl...
How does one structure an rxjs app? There are about a hundred toy intro examples, but not a single example of a full app, with widgets, subwidgets, etc., showing data flow through the whole application.  E.g. suppose you have an observable with some...
I am trying to convert my promise based code to RxJs but have a hard time to get my head around Rx especially RxJs.  I have a an array with paths.  var paths = ["imagePath1","imagePath2"];   And I like to load images in Javascript  va...
What is the cleanest way to perform a side-effect when the last subscription for a RxJS Observable is disposed? This may occur before the Observable has terminated.  Let's say that I need a function returning an Observable that emits changes to a...
I have two behaviour subject streams what I'm trying to forkJoin with no luck. As I imagined it gives back the two last values of it. Is this possible to implement it somehow?  It is not called after the subject.  let stream1 = new BehaviorSubjec...
Unlike other "FRP" libraries, Rx doesn't prevent glitches: callbacks invoked with time-mismatched data. Is there a good way to work around this?  As an example, imagine that we have a series of expensive computations derived from a single...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.