This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-25
Channels
- # announcements (6)
- # asami (1)
- # babashka (80)
- # beginners (89)
- # bitcoin (1)
- # calva (30)
- # cider (33)
- # clj-kondo (1)
- # cljsrn (45)
- # clojars (5)
- # clojure (60)
- # clojure-australia (1)
- # clojure-dev (9)
- # clojure-europe (133)
- # clojure-italy (7)
- # clojure-nl (6)
- # clojure-uk (44)
- # clojurescript (11)
- # conjure (1)
- # data-oriented-programming (2)
- # datahike (13)
- # datascript (4)
- # datomic (19)
- # deps-new (29)
- # depstar (5)
- # duct (39)
- # fulcro (8)
- # girouette (1)
- # helix (10)
- # honeysql (17)
- # jobs (5)
- # jobs-discuss (2)
- # leiningen (6)
- # lsp (51)
- # malli (60)
- # meander (37)
- # membrane (8)
- # off-topic (31)
- # overtone (3)
- # pathom (36)
- # re-frame (8)
- # reagent (30)
- # remote-jobs (2)
- # sci (1)
- # sql (32)
- # startup-in-a-month (3)
- # testing (3)
- # tools-deps (7)
- # xtdb (7)
@esp1 I think useRef
is your friend.
(let [containerRef (useRef)]
(d/div {:id "mycontainer" :ref containerRef}
($ ThatMapBoxComponent {:whatever containerRef})))
But you could just use a fixed id for the container if the Mapbox components is happy with it.
👍 3
☝️ 3
probably the same 😛 the example above used useRef
and I wasn't sure if they were using hx
or something
though I may in a future version move the hooks definitions to helix.core
: https://lilac.town/writing/towards-helix-1-0/
That would be nice, even if they just alias the hooks namespace at first. Feel like most of the time I end up importing both.
also, value of :ref
can be a function, that receives the DOM node at the first argument once its mounted
☝️ 6