Questions tagged [reactive-extensions-js]

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.

121 questions
4
votes
3 answers

Reactive-Extensions / RxJS Implementatation to node.js

I simply want to implement https://github.com/Reactive-Extensions/RxJS to my node project. Surely, there is the npm-package available, but I see it less updated, less modules, and uses only min. files, so I want to use rxjs from git sources. I…
user1028880
4
votes
2 answers

How to use Reactive Extensions to cache, throttle, and relay multiple events?

I am trying to learn the new Reactive Extensions framework for .Net, and it sounds like the perfect solution for my application. After studying examples ( and being fairly weak with LINQ still ), I am struggling to figure out how to leverage the RX…
3
votes
1 answer

What's the relationship between Reactive-Extension and ReactiveX

What's the difference/relationship between those two github groups: Reactive-Extensions (https://github.com/Reactive-Extensions) ReactiveX (https://github.com/ReactiveX)
Yishu Fang
  • 9,448
  • 21
  • 65
  • 102
3
votes
2 answers

RxJS 5 task queue, continue if a task fails

Imagine that we have an HTML page that fires AJAX requests. We want to make sure that AJAX requests are executed in order. The next AJAX request won't be fired until the previous one completes or errors. I have tried to model this via a task queue…
Artur Ciocanu
  • 335
  • 1
  • 3
  • 9
3
votes
2 answers

RxJs: New value only after a period of time has passed

I am new to ReactiveExtensions and I do not get to work s.th. that I think should be a very common usecase. I want to receive a new value only after a specific period of time has passed without a new next value. In the bottom example this period of…
Ramon Rambo
  • 145
  • 2
  • 8
3
votes
2 answers

Trigger custom event in Rx JS

I'm trying to understand Reactive JS. In JQuery I can trigger custom events as $(document).bind('eventbus', function(e, d) { console.log(d);}); $(document).trigger('eventbus', 'test'); and pass around data (i.e. 'test'). It's not clear how to do…
Tristan
  • 6,776
  • 5
  • 40
  • 63
3
votes
1 answer

Unable to create Rx.Observable from JS event

I'm trying to figure out how to use rx.js with a dog-simple example, but can't figure out what reference or file I'm missing that means it isn't working. Empty
mistakenot
  • 554
  • 3
  • 14
3
votes
1 answer

rx: unfold array to multiple streams

I have a stream holding an array, each element of which has an id. I need to split this into a stream per id, which will complete when the source stream no longer carries the id. E.g. input stream sequence with these three values [{a:1}, {b:1}] …
user1009908
  • 1,390
  • 13
  • 22
3
votes
2 answers

How to filter an Observable based on the value of another?

I'm trying to find some way of filtering an observable based on the value of another observable. For example, let's say we only want to receive events between time x and y. Can one filter an observable based on the value of the timer?
3
votes
1 answer

Transform an observable sequence into an observable sequence producing values only from the most recent observable sequence

Example 1: var obsNumber = /* observable that produce numbers */; var obsText1 = /* observable that produce text */; var obsText2 = /* observable that produce text */; var obsContext = /* IF obsNumber < 5 THEN obsText1 ELSE obsText2 */; obsContext…
Egil Hansen
  • 15,028
  • 8
  • 37
  • 54
2
votes
1 answer

Why are methods Observable.While and Observable.Prune in the Microsoft.Phone.Reactive namespace?

I noticed that the Observable.While and Observable.Prune methods are part of the Microsoft.Phone.Reactive namespace. Just curious as to why this is given these methods should be applicable to all OS?
David
  • 15,150
  • 15
  • 61
  • 83
2
votes
1 answer

Rx: Run code after all subscriptions have completed for one 'next'

Say I have a subject somewhere in my code mySubject$ = new Subject() Elsewhere in the code, any number of subscriptions are made, e.g. someSubscription = mySubject$.subscribe(() => console.log('I love streams')) anotherSubscription = …
Hoff
  • 38,776
  • 17
  • 74
  • 99
2
votes
1 answer

Ionic2/angular: how to know when 2 different observables are terminated?

Kind of beginner question here: in an Ionic2 component, I have 2 different service calls using Observables: getTimelineEvents() { this.receiptsEventsRequestState = RequestState.Pending; this.chargesEventsRequestState =…
David Dahan
  • 10,576
  • 11
  • 64
  • 137
2
votes
1 answer

How can you seed a first item with bufferWithCount in rx.js?

Say you do something like: Rx.Observable.range(1, 5).bufferWithCount(2, 1).subscribe(console.log); This returns: [1, 2] [2, 3] [3, 4] [4, 5] [5] I'd like for the result to look like (basically force the first value to emit): [, 1] [1,…
Core
  • 840
  • 11
  • 24
2
votes
1 answer

Why handle Observables inside of middleware - vs dispatching the output of combined Observables?

I feel like I'm taking crazy pills when I see all these middlewares that encourage you to dispatch an action which emits other actions asynchronously. I think the async CAN (and maybe should?) be done before the store. To me the benefit of Rx is…
Dean Radcliffe
  • 2,194
  • 22
  • 29
1 2 3
8 9