Comparing Callbags to RxJS for Reactive Programming
ARANK

Callbags is a different approach that I discovered for reactive programming with streams in JavaScript. It’s a spec that introduces a different abstraction. If you are familiar with RxJS, then Callbags can be understood as a generalization of RxJS, and because of that, they are able to neatly solve problems that were not quite within RxJS's power. As implementations of the spec, there are many community libraries.The name “Callbags” is not a typo, because the spec is about a few rules to callback-based programming in JavaScript. The Callbag spec roughly says: "if your callbacks follow this specific new shape *(type, payload) => {...}* and a few new rules, then you are playing the game named Callbag". Then, once playing that game, you can start applying higher-level strategies. If you think of Callbag-compliant functions as soldiers, then Callbag utility libraries are generals with war tactics. Instead of playing the game directly, you orchestrate it through a sequence of strategies…

egghead.io
Related Topics: Reactive Programming