This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-18
Channels
- # beginners (123)
- # boot (3)
- # cider (6)
- # clara (1)
- # cljs-dev (139)
- # cljsrn (9)
- # clojure (59)
- # clojure-italy (5)
- # clojure-uk (41)
- # clojured (10)
- # clojurescript (67)
- # community-development (1)
- # component (2)
- # core-async (7)
- # cursive (4)
- # datomic (4)
- # defnpodcast (2)
- # fulcro (23)
- # graphql (1)
- # jobs (2)
- # leiningen (4)
- # off-topic (32)
- # portkey (7)
- # protorepl (5)
- # re-frame (19)
- # reagent (5)
- # reitit (23)
- # shadow-cljs (29)
- # slack-help (1)
- # spacemacs (1)
- # tools-deps (21)
- # unrepl (18)
if @signed-in?
was false at first render of the component, @is-mobile
won’t ever trigger re-render of component, am I right?
anyway I would better deref these values in let first and then operate on values in the body of view
@edvorg What you say is true, but if @signed-in
hasn’t changed, then the if
statement will have the same result, so it doesn’t matter.
On the other hand, if @signed-in
has changed, then the component will re-render. So you really don’t have to worry about conditional derefs unless you are relying on side-effects of the render function, which is not reliable.
@borkdude, @pesterhazy, @lee.justin.m - thanks guys!