This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-23
Channels
- # admin-announcements (2)
- # arachne (2)
- # beginners (76)
- # boot (241)
- # cider (14)
- # cljsrn (2)
- # clojars (3)
- # clojure (94)
- # clojure-android (12)
- # clojure-dev (33)
- # clojure-gamedev (1)
- # clojure-greece (3)
- # clojure-india (1)
- # clojure-nl (2)
- # clojure-quebec (3)
- # clojure-russia (21)
- # clojure-spec (38)
- # clojure-uk (72)
- # clojurescript (62)
- # cursive (20)
- # datascript (3)
- # datomic (14)
- # devcards (1)
- # dirac (14)
- # emacs (11)
- # hoplon (7)
- # jobs (2)
- # keechma (1)
- # lein-figwheel (9)
- # leiningen (9)
- # luminus (1)
- # off-topic (6)
- # om (13)
- # onyx (30)
- # planck (181)
- # proton (3)
- # re-frame (6)
- # reagent (6)
- # specter (108)
- # spirituality-ethics (7)
- # untangled (3)
is there a way to avoid writing a -ton- of handlers when dealing with large forms? i.e. i have 2x date inputs, 5x text inputs, and a few others — and one single slice of state {:form {:date-1 x :date-2 x :input-1 x… }}
. Each obviously takes an on-change
, but rather than writing dispatch [:form/date-1-changed %1]
over and over, could I just do [:form/changed (get-value-of-whole-form)]
somehow?
I think that is up to your discretion
I would probably just do :form/changed keyword value
instead of a dispatch for each individual keyword
that seems like overkill
@lwhorton: or perhaps you (dispatch [:form-changed :form-item-id new-value-for-that-item])
then all form item updates go to the one handler