I'm brand new to Rx and am finding it difficult to find documentation on composing promises such that data from the first promise is passed into the second and so on. Here's three very basic promises, the calculations on the data aren't...
Assuming the following code (current state can be viewed here):  function scrollTopFromEvent(evt) {     return $(evt.target).scrollTop(); }  function scrollDirection(evt) {     return -evt.originalEvent.wheelDelta / 120 || evt.originalEvent.detail /...
I'd like to understand the original meaning of functional reactive programming in Haskell and how it differs from the actual application of FRP in Javascript. Unfortunately, I have only a superficial understanding of Haskell and have to stick wit...
I have been experimenting with RxJS for two weeks now, and although I love it in principle I just cannot seem to find and implement the correct pattern for managing state. All articles and questions appear to agree:   Subject should be avoided where...
I'm trying to understand how the following zip function (esp. the invoke function) can be made more functional. The issue I've got is that the invoke method has to wait for both the left and right side to be filled before it can dispatch the...
I'm trying to create a stream/observable that...    Only outputs events when it has subscribers Provides any new subscribers with the latest value.    The concrete case is that I need an observable that makes an Async API call whenever a particul...
I am studying functional reactive programming and most of all the examples I found is all about streams of events for example Bacon.js. I'm not sure I get these examples. I thought FRP is all about changing one variable and continuous change othe...
I'm experimenting with RxJS (with the JQuery extension) and I'm trying to solve the following use case:   Given that I have two buttons (A & B) I'd like to print a message if a certain "secret combination" is clicked within a...
I have an observable that is pulling events off of a server, filtering events for the application type, then subscribing and dispatching the event to one or more handlers to handle.  The handlers then go off and do some async update to the db, and I...
I want to buffer values of an EventStream in Bacon.js exactly like buffer(closingSelector) behaves in RxJava. When the "controller stream" (closingSelector in RxJava method) emits a new value, then the event buffer gets flushed.   So I want t...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.