That can only happen when the main stream is observed in the first place.
James DiGioia
1

Of course the whole thing isn’t triggered until the main observable is observed. But when it is, the .mergeMap() will still cause a side-effect, not the edge of the system.

Going back to my first comment in this thread:

One way to think of this is to try and draw the dataflow of your observable chains. With Cycle.js all the side effects (grey boxes) are at the edges of the dataflow:
If you try drawing the dataflow from the earlier redux-observable example, you’ll end up drawing “grey boxes” midway through your flow — not at the edge.

To me this is really the main difference. If you have grey boxes midway, you’re essentially not pushing side-effects to the edges, making your functions imperative.

Like what you read? Give Luca Matteis a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.