@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.
ohh youโre right. Thank you ๐
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.