@keatondunsford I never tried, but I think it should
Dope.
Hi all. I am trying to do the untangled-devguide but somehow I only get a blank page on http://localhost:3449/
I can see the tests passing on http://localhost:3449/test.html
I set cursive up as described in the tutorial
@nickik I dont use cursive, i just run this stuff directly in the repl, so I think it’s an issue with your cursive config
I did run into the same issue, which I think is yours, is that i didnt start the ”devguide”
cljs build
so you are probably just forgetting to put -Ddevguide
in your cursive build configuration
@adambros Thank you. I have done so already.
I think this should be updated in the provided picture. Its kind of confusing and causes unnecessary delay.
@nickik @tony.kay ah i see, made this for ya https://github.com/untangled-web/untangled-devguide/issues/28
@tony.kay I’m having trouble using :return-handler
to affect state,
no matter what I do it seems the state in (fn [{:keys [state]} _ _] …)
is not actually the same as in the rest of the app
I’ve even tried calling transact! to no avail
am i not supposed to mutate state in return-handler?
(defn my-merge-handler [state-atom return-handler target source]
(letfn [(doreturn [trigger-symbol return-value]
(return-handler {:state state-atom} trigger-symbol return-value))]
(let [handled-source (reduce (fn [acc [k v]]
(cond
(symbol? k) (let [v-without-tempids (if (map? v)
(dissoc v :tempids)
v)]
(if return-handler
(merge acc (doreturn k v-without-tempids))
(dissoc acc k)))
:else acc)) source source)]
(untangled.client.impl.application/sweep-merge target handled-source))))
(set! untangled.client.impl.application/merge-handler my-merge-handler)
Yeah it looks like I have to tweak it to get it to do what I want.
Is there a reason for this? I’m trying to update a last-action timestamp whenever a successful remote happens, is this not how I should do it?It could make sense for it to just be in the networking layer, a :untangled/last-ok-remote-timestamp
-ish
@adambros Thanks you. I hope it saves somebody else some trouble.