This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-17
Channels
- # announcements (4)
- # beginners (82)
- # boot (1)
- # calva (26)
- # cider (13)
- # clj-kondo (41)
- # cljs-dev (25)
- # cljsrn (7)
- # clojure (82)
- # clojure-berlin (1)
- # clojure-brasil (1)
- # clojure-dev (13)
- # clojure-europe (11)
- # clojure-italy (27)
- # clojure-nl (8)
- # clojure-russia (6)
- # clojure-spec (32)
- # clojure-uk (15)
- # clojurescript (61)
- # core-async (1)
- # cursive (9)
- # data-science (1)
- # datomic (18)
- # duct (1)
- # emacs (2)
- # events (7)
- # fulcro (13)
- # graalvm (5)
- # immutant (1)
- # jobs-discuss (63)
- # leiningen (3)
- # off-topic (48)
- # om (3)
- # pathom (13)
- # planck (20)
- # prelude (3)
- # re-frame (55)
- # reagent (13)
- # reitit (5)
- # rewrite-clj (12)
- # shadow-cljs (67)
- # spacemacs (14)
- # sql (5)
- # tools-deps (4)
- # vim (23)
- # yada (2)
What is alternative to using rc-form
in this code example?
I want to do inter-op with Ant Design Mobile from Reagent.
https://mobile.ant.design/components/input-item/#components-input-item-demo-basic.
Code example given above uses createForm
High Order Component from rc-form
to wrap the form.
https://github.com/react-component/form
Hi! Can I update this selected-item-atom
atom?
(defonce selected-item-atom
(ratom/make-reaction
#(get-in @state [:group @selected-group-id-cursor :items @selected-item-id-cursor])))
(swap! selected-item-atom assoc :note "foo")
I would ideally want a cursor where the path can depend on other cursors, here: @selected-group-id-cursor
and @selected-item-id-cursor
my selected-item-atom
reaction can be read, but apparently I can’t write (update) it
(defonce selected-item-atom
(ratom/make-reaction
(fn []
(let [{:keys [selected-group-id selected-item-id] :as s} @state]
(get-in s [:group selected-group-id :items selected-item-id])))))
Interesting, cursor first param can be an atom, but can also be a fn
(defn set-get
([k] (get-in @state k))
([k v] (swap! state assoc-in k v)))
trying..
we can even ignore path