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
1
vote
2 answers
How to delay retrying to send an HTTP request with RxJS5?
I'm having problems with making an RxJS5 observable stream behave in a way that I want it to.
The stream is supposed to send an HTTP request to a website using axios, and if the response is an HTTP error (which axios coerces to a JavaScript error),…

Reinis Riekstins
- 172
- 1
- 2
- 9
1
vote
1 answer
rxjs with multiple forkjoin when doing http requests
I am doing some http requests and use rxjs for successfull notification of the result:
getReportings(departmentId: number): Observable {
return Observable.forkJoin(
this.http.get('/api/members/' + departmentId).map(res =>…

Elisabeth
- 20,496
- 52
- 200
- 321
1
vote
2 answers
Combine multiple Observables with different actions/operations
I'm building an Angular2 app, so I'm getting used to Observables and Reactive Extensions as a whole. I'm using TypeScript and rxjs.
Now I've got an observable, or a stream if you will, of an array of some objects. Let's say Person-objects. Now I've…

YentheO
- 307
- 4
- 13
1
vote
1 answer
Convert Array to Observable, perform transformations and return again as Array?
In ngOnInit() I have "return x" which I want to put into Observable, then perform transformations and return again in the same format.
Here is the working plunker: http://plnkr.co/edit/z26799bSy17mAL4P5MiD?p=preview
import {Component} from…

Teddy
- 2,277
- 3
- 15
- 19
1
vote
3 answers
RxJs: access data before flatMapLatest after flatMapLatest finished
Scenario:
User uses filters which are combined into single stream
When filters change, event to the backend is fired to get "cheap" data
When "cheap" data arrives, another request, with same parameters is fired to different endpoint, that returns…

gerasalus
- 7,538
- 6
- 44
- 66
1
vote
2 answers
Access variables later in the chain
In the example below I'm taking a user and creating a directory for that user. I want to simply log that the user as been created. What's the best way to get access to the user variable later in the chain?
let ensureUser$ = ghUser$
.map(u =>…

ThomasReggi
- 55,053
- 85
- 237
- 424
1
vote
1 answer
Proper way to deal with errors thrown in "onNext" for hot, shared, observables
In RxJS version 5, the following code results in the process being terminated after three iterations of both subscriptions:
var Rx = require("rxjs");
const published$ = Rx.Observable.interval(1000).publish();
published$.subscribe(index => {
…
user19302
1
vote
1 answer
How to handle errors in RxJS using Angular
I'm working on an Angular application which shows a list of items fetched from a RESTful API. The content of the list depends on a query.
The query can be passed either by filling in an input field, using a submit button or by adding it to the URL…

ndequeker
- 7,932
- 7
- 61
- 93
1
vote
1 answer
Merge implemented as flatMap
Theoretically it should be possible to implement any RxJS operator (except just() and flatMap()) through flatMap(). For instance map() can be implemented as
function map(source, selector) {
return source.flatMap(x =>…

André Staltz
- 13,304
- 9
- 48
- 58
1
vote
2 answers
Will Rx.Observable.groupBy clean up empty streams?
In a Node application I'm trying to process a stream of events using RxJS. The event stream is a list of changes to many documents. I'm using groupBy to partition the stream into new streams by documentId. But I'm wondering, once a document is…

Dustin Martin
- 1,297
- 2
- 12
- 22
1
vote
4 answers
Safe update for 2 dependent streams
As an exercise I'm trying to build 2 dependent streams which update one another.
The test application is simply an "Inches <-> Centimeters" converter, with both inputs editable.
The issue I am experiencing is that I cannot get how can I stop…

zerkms
- 249,484
- 69
- 436
- 539
1
vote
1 answer
What is the difference between switchLatest and flatmapLastest in RxJs
I am having difficulty in seeing the difference between switchLatest and flatmapLatest in RxJs with the difference being one flattens a nested observable affer the fact like in scala whilst the other is the equivalent of doing it before returning…

Blair Davidson
- 901
- 12
- 35
1
vote
1 answer
RxJS sending multiple unique ajax requests on event
If I have an event type; say a click event. That I want to fire 3 unique ajax requests for but I want to subscribe to the final result of all 3 requests
What is the proper design pattern for this sequence.
My current code block looks something like…

Jonathan Sheely
- 501
- 1
- 6
- 13
1
vote
1 answer
Example using observables as promises
Does anyone have an example of how RX observables can be used to help the look of asynchronos code?
I am looking for an alternative to promises and I would like to see how it is done in rx.

dagda1
- 26,856
- 59
- 237
- 450
1
vote
1 answer
Is anybody using rx.jquery?
Trying to get my feet wet with RxJS, specifically with rx.jquery. I found a little tutorial here and tried to set it up as follows. It's supposed to take what you type and offer suggestions, pulled from Wikipedia. The call to Wikipedia is successful…

Roy J
- 42,522
- 10
- 78
- 102