This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-03
Channels
- # aws-lambda (6)
- # beginners (38)
- # boot (39)
- # cider (44)
- # cljs-dev (9)
- # cljsrn (96)
- # clojure (142)
- # clojure-dev (6)
- # clojure-dusseldorf (8)
- # clojure-greece (45)
- # clojure-ireland (3)
- # clojure-italy (7)
- # clojure-norway (6)
- # clojure-russia (26)
- # clojure-sg (16)
- # clojure-spec (31)
- # clojure-uk (39)
- # clojurescript (125)
- # cursive (38)
- # datascript (4)
- # datomic (18)
- # emacs (34)
- # figwheel (2)
- # hoplon (3)
- # immutant (23)
- # jobs (1)
- # lambdaisland (2)
- # lumo (13)
- # off-topic (77)
- # om (8)
- # onyx (9)
- # pedestal (2)
- # play-clj (1)
- # re-frame (52)
- # reagent (3)
- # rum (4)
- # spacemacs (2)
- # specter (4)
- # unrepl (37)
- # untangled (8)
- # vim (79)
- # yada (1)
@petterik Thank you. Seems to work nicely for the initial page load (if I’m on the route). But if I change the route remote does not kick in. Am I doing something wrong ?
really like the flow of om-next but really seems tricky to get started. Found what was the gotcha.
(om/transact! c `[(~'change/route! {:route ~route})]))
should be (om/transact! c `[(~'change/route! {:route ~route}) :route/data]))
so that it re-reads the union query and checks for remotes.@claudiu ~'
seems unnecessary, you're quoting and unquoting. Just omit those two characters.
calling transact on a component seems to also trigger the remote. But if call with the reconciler it seems to just re-read from local state. Anyone know if this is the expected behaviour ?
(om/transact! (om/get-reconciler c) `[(change/route! {:route ~route}) :route/data]))
vs (om/transact! c `[(change/route! {:route ~route}) :route/data]))
It looks like it doesn't call transform-reads
if you pass a reconciler: https://github.com/omcljs/om/blob/master/src/main/om/next.cljc#L1568
transform-reads
is replacing simple reads like :route/data
with the full query of the components that care about that read.