This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-15
Channels
- # admin-announcements (60)
- # adventofcode (37)
- # beginners (53)
- # boot (94)
- # bristol-clojurians (1)
- # cider (21)
- # clara (19)
- # cljsrn (1)
- # clojure (222)
- # clojure-chicago (1)
- # clojure-dev (2)
- # clojure-nl (11)
- # clojure-russia (301)
- # clojure-turkiye (1)
- # clojurecup (6)
- # clojurescript (30)
- # core-async (3)
- # cursive (64)
- # datascript (2)
- # datomic (55)
- # devops (16)
- # editors (1)
- # emacs (16)
- # ldnclj (6)
- # off-topic (18)
- # om (113)
- # onyx (3)
- # parinfer (1)
- # proton (48)
- # re-frame (20)
- # reagent (7)
@edvorg: as a general rule, local state is best avoided. BUT, having said that, we use local state quite a bit to hold "mouse-over?" kinda information. But the rule is this: the moment that local state has to be synchronised (the value has to be propogated) outside of the the current component, then local state is almost certainly the wrong option. Look up From-2 components: https://github.com/Day8/re-frame/wiki/Creating-Reagent-Components
Perhaps look at re-com for inspiration
BTW, nice trick you have: ^{:key @add-button-focus}
to force focusing
@phil component-did-mount
should only fire once. So it is working as expected. Did you want to also provide component-did-update
? This may be of specific interest to you: http://yogthos.net/posts/2015-11-12-ClojureScript-Eval.html and this may be of general interest https://github.com/Day8/re-frame/wiki/Using-Stateful-JS-Components
@mikethompson thanks - will give the latter a thorough read.
Thank, you @mikethompson.