om

Please ask the channel first, not @dnolen directly!
ag 2017-06-15T00:37:48.157952Z

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.

ag 2017-06-15T00:42:54.198283Z

how do I handle things that happen AFTER successful mutation on the server? I need to mutate local state then

ag 2017-06-15T00:43:26.202456Z

I can't seem to be able to do that in :action fn, it happens before remote mutation

ag 2017-06-15T01:16:34.466216Z

or can I anyhow impact other keys from remote mutate method?

ag 2017-06-15T01:18:44.483545Z

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?

matthavener 2017-06-15T01:57:35.783003Z

you can send back any novelty you want from a remote mutate

levitanong 2017-06-15T16:57:14.974239Z

Is there any special way to pass parameters to a read Iā€™m om/forceing?

levitanong 2017-06-15T16:58:22.999288Z

oops, scratch that, I had a typo šŸ˜›