The Reactive Extensions for JavaScript is a set of libraries to compose asynchronous, resilient and responsive event driven programs using observable collections with ECMA Script5 Array#extras style composition in JavaScript.
Questions tagged [reactive-extensions-js]
121 questions
65
votes
6 answers
rxjs flatmap missing
I try to chain multiple rx.js observables and pass the data. Flatmap should be the fitting operator but with an import of
import { Observable } from 'rxjs/Observable';
it is not found:
Error TS2339: Property 'flatmap' does not exist on type…

Georg Heiler
- 16,916
- 36
- 162
- 292
53
votes
2 answers
Angular2 RxJS getting 'Observable_1.Observable.fromEvent is not a function' error
I'm using AngularJS 2 Beta 0 and I'm trying to create an RxJS Observable from an event on a window object. I believe I know the formula for capturing the event as an Observable in my service:
var observ = Observable.fromEvent(this.windowHandle,…

Michael Oryl
- 20,856
- 14
- 77
- 117
45
votes
1 answer
SignalR vs. Reactive Extensions
Is SignalR the same thing is Reactive Extensions? Can you explain why or why not?

Mike Flynn
- 22,342
- 54
- 182
- 341
37
votes
4 answers
Filter an observable using values from another observable
I have two observables:
An observable representing a list of checkbox inputs.
An observable representing a stream of events coming from the server.
I'd like to filter the second observable using values from the first one.
The values received from…

Ionuț G. Stan
- 176,118
- 18
- 189
- 202
27
votes
5 answers
RxJs: poll until interval done or correct data received
How do i execute the following scenario in the browser with RxJs:
submit data to queue for processing
get back the job id
poll another endpoint every 1s until result is available or 60seconds have passed(then fail)
Intermediate solution that i've…

gerasalus
- 7,538
- 6
- 44
- 66
25
votes
4 answers
Can I observe additions to an array with rx.js?
fromArray Rx wiki on github
coffee> rext = require 'rx'
coffee> arr = [1..5]
[ 1, 2, 3, 4, 5 ] …

jcollum
- 43,623
- 55
- 191
- 321
22
votes
3 answers
Publish the last value of an observable
I have a hot observable (a subject in this case):
var subject = new Rx.Subject();
I want to create another observable that every time a new subscriptions is being made immediately fires out the last value that was produced.
So in pseudo code:
var…

Christoph
- 26,519
- 28
- 95
- 133
20
votes
3 answers
RxJS Continue Listening After Ajax Error
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 a…

Jonathan Sheely
- 501
- 1
- 6
- 13
18
votes
1 answer
How to structure rxjs code
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…

user1009908
- 1,390
- 13
- 22
18
votes
1 answer
GHCJS: How do I import a high order javascript function using FFI?
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…

Holoed
- 643
- 4
- 15
17
votes
3 answers
ForkJoin 2 BehaviorSubjects
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…

Lajos
- 2,549
- 6
- 31
- 38
14
votes
2 answers
Requesting a clear, picturesque explanation of Reactive Extensions (RX)?
For a long time now I am trying to wrap my head around RX. And, to be true, I am never sure if I got it - or not.
Today, I found an explanation on http://reactive-extensions.github.com/RxJS/ which - in my opinion - is horrible. It says:
RxJS is to…

Golo Roden
- 140,679
- 96
- 298
- 425
12
votes
1 answer
RxJS Observable: performing cleanup when the last subscription is disposed?
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…

Kimmo
- 123
- 1
- 5
11
votes
1 answer
RxJS Interval without delay
The following code emits an int after 5000ms and then another in every 5000ms later:
let evens = Observable.interval(5000)
.map(i => {
return i * 2;
});
evens.subscribe((i) => {
console.log(i);
});
Is it possible to do…

gunwin
- 4,578
- 5
- 37
- 59
11
votes
1 answer
RxJS split observable sequence in multiple output
Is it possible to split a single observable flux in multiple other observables?
My use case is a form that a user can submit. The submit action is handled in an observable, and on this action, there's a validator…

Simon Boudrias
- 42,953
- 16
- 99
- 134