Calculations in Re-frame Subscriptions - Syntactic sugar!


#1

I’m really enjoying the way you explain things, @ericnormand . Fantastic work.
I’m jumping into everything that involves building webapps using Re-frame and learning tons from the “tricks” and design choices that you are making.
FYI, the “official” re-frame resources also mention some handy syntactic sugar for nested subscriptions that removes a bit of boilerplate. It’s a small thing, but I personally find it much cleaner :slight_smile:

(reg-sub
:a-b-sub
:<- [:a-sub]
:<- [:b-sub]
(fn [[a b] [_]] {:a a :b b}))