This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-04
Channels
- # beginners (25)
- # boot (14)
- # business (1)
- # cljsrn (2)
- # clojure (180)
- # clojure-korea (14)
- # clojure-russia (8)
- # clojure-spec (9)
- # clojure-uk (17)
- # clojurescript (110)
- # cursive (14)
- # datomic (18)
- # emacs (23)
- # events (4)
- # garden (7)
- # hoplon (44)
- # lein-figwheel (1)
- # liberator (4)
- # london-clojurians (1)
- # om (10)
- # om-next (2)
- # onyx (22)
- # protorepl (60)
- # re-frame (36)
- # reagent (11)
- # ring (10)
- # yada (5)
can links be used with joins?
`[{[:some/link _] ~(om/get-query SomeComponent)}]
nvm, figured my issue out
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 [...]}
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"]]
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)}))
@yonatanel - the :value
is just for documentation. It doesn't do anything. So easiest thing is to just leave it out.