This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-02
Channels
- # beginners (72)
- # boot (68)
- # cider (51)
- # clara (20)
- # cljs-dev (44)
- # cljsrn (7)
- # clojure (168)
- # clojure-brasil (1)
- # clojure-dev (48)
- # clojure-greece (2)
- # clojure-nl (29)
- # clojure-russia (4)
- # clojure-spec (19)
- # clojure-uk (28)
- # clojurescript (2)
- # cursive (9)
- # datascript (1)
- # datomic (105)
- # dirac (1)
- # docker (2)
- # duct (11)
- # emacs (19)
- # events (1)
- # figwheel (1)
- # fulcro (23)
- # garden (4)
- # graphql (5)
- # hoplon (46)
- # jobs (5)
- # juxt (13)
- # leiningen (6)
- # lumo (12)
- # off-topic (29)
- # parinfer (5)
- # re-frame (7)
- # reagent (6)
- # ring (2)
- # sql (5)
- # yada (6)
could someone please help me think about the following ReactJS example in a Reagent kind of way? the component seems to have an inherent handle on its children via this.refs
. is this possible in Reagent? the only way i know how to get refs is to supply a {:ref fn} property to a child component in the render function. the goal is to store all bounding boxes of children components prior to render, and while i could use jquery i'd prefer to use the reagent way.
https://gist.github.com/joshwcomeau/5b0f0f6c9642930d813e#file-atu_2-jsx-L5
@joshkh you can do ref callbacks just like in normal react by passing something like :ref #(reset! *ref %)
to the component