This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-15
Channels
- # beginners (11)
- # boot (80)
- # carry (1)
- # cider (5)
- # cljs-dev (290)
- # cljsrn (4)
- # clojure (50)
- # clojure-canada (5)
- # clojure-dev (2)
- # clojure-korea (2)
- # clojure-russia (17)
- # clojure-spec (22)
- # clojurescript (41)
- # cursive (12)
- # datomic (10)
- # figwheel (1)
- # hoplon (68)
- # klipse (1)
- # off-topic (1)
- # om (16)
- # onyx (15)
- # parinfer (1)
- # proto-repl (4)
- # proton (2)
- # re-frame (14)
- # reagent (12)
- # ring (5)
- # vim (4)
- # yada (34)
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!
@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:
(reg-sub
:cards-for-table
(fn cards-for-table [db [_ table-entity]]
(ui/latest-cards db (:table/id table-entity))))
the dependency that fails:
(reg-sub
:sorted-cards-for-table
:<- [: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 ....]))
Thanks @mikethompson !
Hi guys, would someone be able to point me in the right direction for using geolocation in re-frame? I’ve found these links: https://gist.github.com/stepankuzmin/2680992 https://gist.github.com/cap10morgan/7493266 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.