What is Bacon.js equivalent to Rx.JS' withLatestFrom()?

142 views Asked by At

I'm trying to get use of atomic updates Bacon.js offers so have to rewrite Rx.JS code at some places of my app to Bacon.js, but can't figure out yet how can I implement withLatestFrom() with Bacon.js?

In such a way that, for example, when user clicks, some code executes with latest value from $serverResponses stream, but when server responses, that code (click handler) should not execute.

Thanks in advance :)

1

There are 1 answers

0
raimohanska On BEST ANSWER

Try sampledBy. It has inverse argument ordering compared to withLatestFrom, but does the same thing.