This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-10
Channels
- # admin-announcements (1)
- # alda (1)
- # bangalore-clj (1)
- # beginners (94)
- # boot (139)
- # braveandtrue (1)
- # cider (19)
- # cljs-dev (21)
- # cljsjs (8)
- # cljsrn (79)
- # clojure (124)
- # clojure-austin (1)
- # clojure-belgium (1)
- # clojure-berlin (3)
- # clojure-hamburg (3)
- # clojure-quebec (1)
- # clojure-russia (77)
- # clojure-spec (5)
- # clojure-uk (18)
- # clojurescript (39)
- # conf-proposals (21)
- # core-async (5)
- # cursive (8)
- # datomic (40)
- # defnpodcast (1)
- # devcards (14)
- # dirac (5)
- # editors (1)
- # emacs (4)
- # jobs (1)
- # liberator (4)
- # onyx (29)
- # perun (15)
- # proton (15)
- # protorepl (9)
- # re-frame (47)
- # reagent (38)
- # ring (1)
- # rum (7)
- # specter (23)
- # untangled (8)
- # yada (55)
@kenbier: Just jumping in here, but I would not recommend resetting app state via mount/unmounts. Do that as part of your transaction that does the close: (transact! this '[(dialog/reset-fields) (dialog/close)])
And Untangled/Om do recommend you place the vast majority of your application state in the central global app state database.
Basically, component local state is relatively ok if you don't really care about the intermediate states for history viewing/debugging, or the dynamic interaction proves to be too slow (changing a global app state on a large app while doing rapid graphical animation like during the drawing of a bounding box). One other case is where you want to hold onto things that are not serializable for history viewing (like a js Image object). I plan to add some more recipes to the cookbook that demonstrate some cases.
@tony.kay: that is a much better idea, thanks. mostly we moved away from putting form fields in global app state because a txn on each keypress was causing a lag in render. do you tend to put most of your form fields in app state?
@tony.kay: you mean something like local state for individual keypresses, then commit to app state onblur or similar? I was theorizing we could do something like that yesterday when talking about this with @kenbier
Would be interested to see what that looks like - seems like it'd be good for us, we don't have too many text fields.