Issues migrate from 1.0.1 to 3.x

11 views
Skip to first unread message

Paul Reeve

unread,
Sep 28, 2020, 4:31:18 AM9/28/20
to Bacon.js
I have a number of production apps that depend on Bacon and have held off migrating from v1 for a while.  I read the transition notes, reviewed the API docs and just gave it a go.

Mostly things migrate ok, but I have one app which uses a combineWith chain to perform logical transitions on incoming events. Like this, only the tree is a little deeper.

Bus-> }
Bus-> } combineWith() --->}
Bus-> }                                  } combineWith() ->
                                              }
Bus-> } combineWith() --->}
Bus-> }

In Bacon 1 this works as one would expect: an event on a Bus triggers the first combineWith() consumer and trickles on through. I have the stream instrumented
with doAction() calls for debug purposes and can see it happening.

In Bacon 3 I see the triggering events. Sometimes I see events passing through
the first level of combineWith() and less frequently I see events passing through
the second level.

If I revert to 1.0.1 everything works again as I would expect.

So. Most likely, something is different in v3 and I have missed the transition note re changes. Or, unlikely, something is broken in v3.

Can anyone out there offer a pointer. It would be really helpful.

Thanks

P



raimohanska

unread,
Sep 28, 2020, 4:41:11 AM9/28/20
to Bacon.js
Based on your description, cannot immediately think of why it wouldn't work. Is it possible to simplify the setup so that you could demonstrate the problems in an Issue with a CodeSandbox example? Simplifying can also help you to find the possible problem in your code, if any.

A common cause of missed updates is that you for some reason don't have a subscriber in the receiving end (or it's assigned too late in the game so that updates have been missed). So one thing to check would be to add a .log() for the Big Property that's the result of all of the combineWith calls.

Happy hacking!

-juha-

Reply all
Reply to author
Forward
0 new messages