Side Effects: Angular Signals vs rs-x
The Problem You want to react to state changes and run some code as a side effect. Every reactive library solves this. But how they solve it changes a lot about your code. Angular Signals — effect(...

Source: DEV Community
The Problem You want to react to state changes and run some code as a side effect. Every reactive library solves this. But how they solve it changes a lot about your code. Angular Signals — effect() effect(() => { console.log('price changed:', price()); }); ✅ Simple to read ⚠️ Re-runs when any signal read inside changes ⚠️ Requires Angular's runtime and compiler ⚠️ Lifecycle managed separately from your data rs-x — The Sequence Expression const expr = rsx( '(trackPrice(price), trackQty(quantity), price * quantity)' )(model); (a, b, c) is standard JavaScript. The comma operator evaluates left to right and returns the last value. rs-x parses it exactly as a JS engine would — no new syntax, no compiler. Fine-Grained by Default rsx('(trackPrice(price), trackQty(quantity), price * quantity)')(model) // ↑ tracks price ↑ tracks quantity ↑ return value Change Re-runs model.price = 150 trackPrice only model.quantity = 5 trackQty only Both change Both re-run Each segment tracks its own depend