This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-07
Channels
- # aleph (19)
- # aws (1)
- # beginners (75)
- # boot (28)
- # cider (1)
- # cljs-dev (12)
- # cljsrn (20)
- # clojure (350)
- # clojure-argentina (1)
- # clojure-chicago (2)
- # clojure-dev (2)
- # clojure-russia (5)
- # clojure-spec (2)
- # clojure-uk (14)
- # clojure-ukraine (3)
- # clojurescript (68)
- # component (87)
- # core-async (25)
- # core-logic (13)
- # cursive (4)
- # data-science (72)
- # datascript (59)
- # datomic (15)
- # defnpodcast (7)
- # emacs (33)
- # hoplon (5)
- # immutant (73)
- # jobs (21)
- # klipse (6)
- # lumo (14)
- # off-topic (26)
- # om (23)
- # onyx (6)
- # parinfer (37)
- # protorepl (4)
- # re-frame (13)
- # ring (2)
- # rum (3)
- # spacemacs (2)
- # specter (22)
- # sql (47)
- # uncomplicate (10)
- # unrepl (79)
- # untangled (66)
- # vim (47)
- # yada (17)
@mikethompson I ended up with a bit of a frankenstein solution, where I do
{:component-did-update ;;TODO this causes way too many calls to .focus, wonder if I can reduce this with a different lifecycle hook?
(fn [this]
(.focus (r/dom-node this)))
My problem is that the input component to be focused is "rendered" when the app is rendered, it's just not visible until later (when its popup has opened) and by then, the user has of course moved the focus elsewhere. Therefore, :auto-focus
seemed less viable. But then, there is nothing deterring me from conditionally rendering the input component only when its poup opens, so I think I can use that along with :auto-focus
, to get the job done.
I'll try it tonight 🙂
heya! what is the right way to go about making a :graphql-fx
that uses :http-fx
. I originally made a :graphql-fx
that did the http calls directly but it feels a bit wrong
or should I write a graphql->http interceptor?
@andre hrmm I tried replicating the problem by deliberating changing an assoc-in
to assoc
and nothing bad happened. It's odd because I have had this problem where re-frisk would no longer display its contents and just print an error in the debugging popup. So it must be something else that is the trigger. It's happened a couple of times, if it happens again I will try and be more mindful about what's going on.
I’m looking for a way to do “debounced dispatch” or “delayed subscription update” to avoid GUI responsiveness issues due to expensive subscription calculations. Does anyone have an idea?
hello everyone, sorry for the basic question but .. looking at the re-frame example i see
(defn main-panel []
(let [active-panel (re-frame/subscribe [:active-panel])]
(fn []
[show-panel @active-panel])))
@plins See this wiki article: https://github.com/Day8/re-frame/wiki/Using-%5Bsquare-brackets%5D-instead-of-%28parentheses%29 TLDR: “the square version will be more efficient at “re-render time”. Only the DOM which needs to be re-rendered will be done”