This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-26
Channels
- # admin-announcements (1)
- # beginners (1)
- # boot (252)
- # braveandtrue (1)
- # cider (17)
- # clojure (58)
- # clojure-chicago (3)
- # clojure-russia (125)
- # clojure-uk (2)
- # clojurescript (38)
- # hoplon (3)
- # lein-figwheel (11)
- # leiningen (1)
- # mount (2)
- # off-topic (3)
- # om (9)
- # onyx (39)
- # parinfer (24)
- # proton (7)
- # protorepl (7)
- # quil (4)
- # re-frame (16)
- # reagent (5)
- # ring-swagger (18)
- # yada (1)
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
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
the enclosing component's query includes a reference to the child component's query, so I don't think this can be true
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
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).
I think the answer is whenever you change local state - that also causes the component to be re-rendered.
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 }