Fork me on GitHub
#om
<
2016-12-04
>
levitanong03:12:37

can links be used with joins?

`[{[:some/link _] ~(om/get-query SomeComponent)}]

levitanong04:12:25

nvm, figured my issue out

yonatanel12:12:40

Hi, I'm following the om.next tutorial and in the mutate function part, when I try a mutation it doesn't know and we return {:value :not-found}, I get this error: xxx mutation :value must be nil or a map with structure {:keys [...]}

yonatanel12:12:07

I've actually changed the dependencies to latest ones:

:dependencies [[org.clojure/clojure "1.9.0-alpha14"]
                 [org.clojure/clojurescript "1.9.293"]
                 [org.omcljs/om "1.0.0-alpha47"]
                 [figwheel-sidecar "0.5.8" :scope "test"]]

yonatanel12:12:25

And now changed the else value to nil by using when instead of if, which seems to work:

(defn mutate [{:keys [state]} key params]
  (when (= 'increment key)
    {:value {:keys [:count]}
     :action #(swap! state update-in [:count] inc)}))

cjmurphy14:12:12

@yonatanel - the :value is just for documentation. It doesn't do anything. So easiest thing is to just leave it out.

yonatanel14:12:29

@cjmurphy It doesn't even help with optimizing rerendering according to the mutated keys?

cjmurphy14:12:52

Doesn't help with anything. See channel details pinned items, the png 2016/02/17.

a.espolov23:12:10

Guys in view of the latest news datomic, it remains topical use of temp-ids in om?

haywood23:12:03

I'm having a bit of trouble getting the response that's passed to the send's callback to be merged correctly. Basically I'm doing all the normalization work before the callback is called, and I need it to just do (merge a b) but I"m getting funky results