Fork me on GitHub

I got a re-frame app that in dev works smoothy but with :optimizations :advanced does never enter into the handlers (I tried to put logs in the generated JS), how can it be possible? Any hint on how to debug?


aaaaaand...of course it was a bug in my code! facepalm facepalm facepalm


@richiardiandrea: What kind of bug was it that worked in dev but not advanced mode?


a bug related in my logic and goog.DEBUG 😄


If a subscription has a parameter and I would like to depend on it using the new :<-, how can I "pass" the parameter to it?


Sample of parent:

 (fn cards-for-table [db [_ table-entity]]
   (ui/latest-cards db (:table/id table-entity))))


the dependency that fails:

 :<- [:cards-for-table]
 (fn cards-for-table [cards _]
   ;; sort cards here))


@richiardiandrea: Oh good - I know I'm going to do something like that the day before I want to ship something, so I appreciate the details. Hopefully I'll remember what part to check first when it happens to me... :)


@shaun-mahood not problem, yeah it is good to learn from others' bugs 😄 I totally agree, in particular we are not using the -fx part for booting our app and we are trying to avoid executing the sente routing more than once in dev...some logic that I hope I can happily change with the boot..-fx new re-frame stuff 😄


@richiardiandrea > If a subscription has a parameter and I would like to depend on it using the new :<-, how can I "pass" the parameter to it? The new sugar only works in the simple case. :<- [:something] you can't do :<- [:something param]


You'd have to revert back to the non sugar version and provide a signal function:

(fn [query-v _] 
    (subscribe [:something ....]))


Hi guys, would someone be able to point me in the right direction for using geolocation in re-frame? I’ve found these links: but I’m not sure how to translate this re-frame. So far I can get the latitude and longitude to print in the console but I think those results return too late to be put into the db in the event, so on my page they are just nil. My thought is that I need to add a handler to put the results into the db when they return but I’m not sure how to go about that.