This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-15
Channels
- # aws-lambda (6)
- # beginners (8)
- # cider (12)
- # cljs-dev (12)
- # cljsrn (9)
- # clojars (2)
- # clojure (161)
- # clojure-berlin (9)
- # clojure-italy (10)
- # clojure-russia (18)
- # clojure-spec (20)
- # clojure-uk (18)
- # clojurescript (37)
- # cursive (13)
- # data-science (1)
- # datomic (23)
- # flambo (2)
- # hoplon (22)
- # immutant (11)
- # jobs (1)
- # klipse (11)
- # leiningen (5)
- # liberator (7)
- # luminus (5)
- # lumo (3)
- # off-topic (28)
- # om (8)
- # onyx (15)
- # parinfer (111)
- # pedestal (21)
- # re-frame (6)
- # reagent (38)
- # rum (4)
- # spacemacs (2)
- # specter (34)
- # unrepl (122)
- # untangled (3)
- # vim (1)
- # yada (8)
Damn it, I'm confused again: If I need a perform remote mutation and depending of what result of that mutation, shuffle things in the state atom. If I do
defmethod mutate 'foo/fire-missiles!
[_ _ _]
{:remote true
:action (fn []
;; read the state,
;; adjust thee state based on value of (get @state 'foo/fire-missiles!)
)}
;; an on the back:
defmethod mutate 'foo/fire-missiles!
[_ _ _]
{:value (fire-missiles-result)}
I thought this would work, but it doesn't as expected. I have to transact it twice.how do I handle things that happen AFTER successful mutation on the server? I need to mutate local state then
something like
defmethod mutate 'foo/fire-missiles! [_ _ _]
{:value {:yes-it-fired true}}
is there a way (without using custom merge fn) to force the novelty to appear in the top-level key :yes-it-fired
?you can send back any novelty you want from a remote mutate
Is there any special way to pass parameters to a read I’m om/force
ing?
oops, scratch that, I had a typo 😛