Question related to Bacon.update behaviour

38 views
Skip to first unread message

Erik Karlsson

unread,
Jan 10, 2015, 4:18:13 PM1/10/15
to bac...@googlegroups.com
Hi,

I would have small question related to the Bacon.update behaviour.

Here is simple example code:

  var test1 = Bacon.constant(5);
  var q = Bacon.update(6, test1, function(_, n) { return n;});
  q.onValue(function(v) {
    console.log('test value: ', v);
  });

Why is this code producing:

test value: 6

and not

test value: 6
test value: 5

I missed now something, my understanding was that all subscribers should also get the value 5 - or is the bacon.update handling the events so that it doesn't actually subscribe to the streams?

Thanks for clarification,
- Erik


Reply all
Reply to author
Forward
0 new messages