This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-14
Channels
- # beginners (31)
- # boot (9)
- # cider (10)
- # cljs-dev (9)
- # cljsrn (16)
- # clojure (222)
- # clojure-austin (4)
- # clojure-france (13)
- # clojure-italy (21)
- # clojure-nl (2)
- # clojure-russia (71)
- # clojure-spec (9)
- # clojure-uk (39)
- # clojurescript (50)
- # cursive (16)
- # datomic (69)
- # dirac (2)
- # figwheel (1)
- # graphql (19)
- # hoplon (4)
- # jobs (1)
- # klipse (3)
- # leiningen (4)
- # liberator (3)
- # luminus (9)
- # lumo (9)
- # off-topic (3)
- # om (21)
- # onyx (11)
- # parinfer (2)
- # pedestal (8)
- # planck (19)
- # re-frame (17)
- # reagent (12)
- # remote-jobs (1)
- # ring-swagger (3)
- # spacemacs (17)
- # specter (23)
- # sql (1)
- # unrepl (64)
- # untangled (19)
- # yada (5)
Not sure if everyone already knew about this but I am finding https://github.com/rauhs/klang an excellent adjunct to re-frisk and replacement for high-level println/console debugging (I still dump detail to the console)
@andre something i would find really useful is being able to "prime" re-frisk with important keypaths for my app and have them turned into bookmarks into the app-db.
Do you always have to have an event handler registered for every event in re-frame? With the async-flow-fx, I've found myself wanting to listen to events that particpiate in the flow, but are no-op in terms of db and effects. I've put in dummy no-op event handlers but wondering if this is necessary or there is another way.
@danieleneal no other way, currently. Events need a handler
cool thanks! Good to know for sure 🙂
Hey #re-frame'rs, is there a way to schedule a piece of code to be run after the rendering?
you might be able to use a form-3 component with component-did-update
but that's not reframe specific, just react
Ho yea, thanks for the quick reply @danieleneal!
(defn scrollBottom! [this]
(let [o (reagent/dom-node this) #_(.getElementById js/document id)]
(set! (.-scrollTop o) (.-scrollHeight o))))
(defn my-component [...]
(let [... subscribscriptions]
(reagent/create-class
{:component-did-update
(fn [this old-argv]
(scrollBottom! this))
:reagent-render
(fn [...] old-render)})))
IIRC, the dom-node
method was going to be deprecated by the react team, is it safe to use now?
ah I don't know I'm afraid @lsenta - but you might be right
It doesn't mention anything in the code https://github.com/reagent-project/reagent/blob/78ae18dce28585fc2ba99ccb2bbb975d85386bb0/src/reagent/dom.cljs#L59-L62
ah yeah