1

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 :)

Slaus
  • 2,086
  • 4
  • 26
  • 41

1 Answers1

2

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

raimohanska
  • 3,265
  • 17
  • 28