Fork me on GitHub
#om
<
2016-03-26
>
mhcat00:03:50

So I'm still struggling with this. My enclosing component is now initiating the delete (it is the first arg to the transact, in a closure passed via computed props) but still the enclosing component doesn't re-render

mhcat00:03:35

I looked at the FAQ, which seems to suggest that if the mutation doesn't touch keys in the initiating component's query, this can happen

mhcat00:03:34

the enclosing component's query includes a reference to the child component's query, so I don't think this can be true

mhcat04:03:19

ok, I solved the problem, by reading this https://github.com/awkay/om-tutorial/blob/master/src/tutorial/om_tutorial/F_Mutation.cljs and deleting the correct reference to the ident from the enclosing component's data structure, rather than from the normalized table for the child component

cjmurphy09:03:51

I expect to see components rendered when the browser is refreshed, and in conjunction with mutations. At what other times do components get rendered? I am seeing components be re-rendered when I click on one of them. But this click is not activating any mutations (I have debug messages on all mutations so I know when they are triggered).

cjmurphy10:03:13

I think the answer is whenever you change local state - that also causes the component to be re-rendered.

frank17:03:17

in om.next, what is the :value key in the return value of a mutation function for?

taylor.sando17:03:51

Unless things have changed since the last time I understood it, it is mostly for a remote parser that returns a value. There are basically two places to return values on a remote parser mutation. In the action, and in the the value. What is returned by the action callback will be merged into the value under the :result key. So if your value was

{:x 5}
and your action returned
{:y 7
, your final return would be
{:x 5 :result {:y 7 }