This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-24
Channels
- # aleph (4)
- # beginners (93)
- # cider (7)
- # cljs-dev (16)
- # cljsrn (5)
- # clojure (192)
- # clojure-dusseldorf (3)
- # clojure-italy (14)
- # clojure-russia (16)
- # clojure-serbia (1)
- # clojure-spec (85)
- # clojure-taiwan (1)
- # clojure-uk (79)
- # clojurescript (188)
- # code-reviews (9)
- # core-async (2)
- # crypto (1)
- # cursive (26)
- # datomic (21)
- # heroku (1)
- # hoplon (3)
- # jobs (7)
- # jobs-discuss (20)
- # jobs-rus (13)
- # off-topic (77)
- # om (15)
- # onyx (23)
- # pedestal (94)
- # planck (11)
- # proton (10)
- # protorepl (1)
- # re-frame (16)
- # ring (22)
- # ring-swagger (9)
- # rum (2)
- # specter (18)
- # testing (2)
- # untangled (14)
- # vim (12)
- # yada (58)
I'm trying to use :shared-fn to share the current user across all components. Problem is, it isn't updated on login/logout without a refresh. Is there a way to 'refresh' the reconciler?
Login and logout are the only times when this is a problem, but i'd rather not trigger a page reload if I can avoid it.
Found it! https://github.com/omcljs/om/blob/master/src/main/om/next.cljc#L2809
Doesn't seem to work 😞 I'm trying to call it in componentDidUpdate of my Wrapper component if the user props change..
It does go through my :shared-fn.
It seems like force-root-render!
does not force re-rendering every component, it still diffs the props. This seemed to be the problem earlier ^^, I was looking for a method of refreshing the entire UI tree.
you have to change the key on the root element, or React won't really re-render everything
oh, sorry, that comment was an untangled-ism, but the fact is true for React in general
If the React key changes on an element, then React doesn't even look at diffs: it just re-renders the whole UI (sub)tree