Fork me on GitHub
#re-frame
<
2019-01-30
>
heyarne17:01:48

I'm getting computation_fn is null when trying to deref a subscription even though i called (rf/reg-sub ::kw fn) and the browser log shows me that a subscription is registered

heyarne17:01:52

what does that mean?

heyarne17:01:39

ooops. did not call reg-sub with a function at one point

danielcompton20:01:15

@jacobhaag17 what @kasuko said is right. Think of events as logical 'business' actions: "Create account", "Log In", "Archive document". They are all about the what, not about the how. Your event handler can then do whatever it needs to action the event, but the view remains ignorant of it. Events, Subscriptions, Views, and app-db structure should all remain mostly separated from each other, with little knowledge of what the others are doing, except through the exposed interfaces

💯 5
danielcompton20:01:14

@ag That namespace comes from https://github.com/Day8/re-frame-debux/blob/master/src/day8/re_frame/tracing.cljc. The function tracing code relies on the presence of re-frame-10x to be useful, but 10x doesn't (currently) bundle the tracing lib

danielcompton20:01:50

So yep, it's still relevant, it's the way you can trace event handler execution

Jacob Haag21:01:27

Thanks for the original reponse @kasuko and elaborating on it @danielcompton 🙂