Fork me on GitHub
#re-frame
<
2020-09-10
>
Dmytro Bunin18:09:45

One more stupid question. Except for making subs not pure. Why is it bad to subscribe in reg-subs , What I mean is something like this

(rf/reg-sub
 ::foo
 :<- [:bar]
 (fn [bar]
   @(rf/subscribe [bar])))

dpsutton19:09:23

Have to track which components need to rerender when the data changes. And “untrack” when it in lints. There is no time this function can untrack and so it’s just leaked in the tracking. (My understanding. There’s a lib that does this for you and some googling will find it. I’m eating lunch now)

p-himik19:09:20

Actually, it should be fine in that regard because it's all wrapped in a reaction.