This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-30
Channels
- # announcements (15)
- # beginners (143)
- # boot (2)
- # calva (48)
- # cider (93)
- # cljsrn (2)
- # clojure (127)
- # clojure-europe (3)
- # clojure-italy (8)
- # clojure-losangeles (8)
- # clojure-nl (10)
- # clojure-spec (67)
- # clojure-uk (51)
- # clojurescript (20)
- # cursive (9)
- # data-science (2)
- # datomic (10)
- # duct (13)
- # figwheel-main (1)
- # fulcro (74)
- # instaparse (10)
- # jobs (3)
- # joker (8)
- # juxt (4)
- # lumo (1)
- # malli (11)
- # nrepl (3)
- # off-topic (4)
- # pathom (5)
- # pedestal (6)
- # planck (5)
- # re-frame (18)
- # reagent (5)
- # reitit (17)
- # shadow-cljs (165)
- # sql (30)
- # vim (12)
- # xtdb (6)
this should work ^{:ref ref} [component]
Is this about ref forwarding? I tried to run a simple test to try to understand what you guys are talking about but to no avail. Here's what I tried
(defn inner [& args]
(js/console.log "Args:" args)
[:div "Hello"])
(defn main []
(let [ref (react/createRef)]
(js/setTimeout #(js/console.log "Ref:" ref) 3000)
^{:ref ref} [inner]))
When I run it it prints Args: null
and Ref: {current: null}
. I run it using Reagent version 0.8.1
. 😕I have no idea what Reagent does with refs internally
replied to a thread:this should work `^{:ref ref} [component]`
Is this about ref forwarding? I tried to run a simple test to try to understand what you guys are talking about but to no avail. Here's what I tried
(defn inner [& args]
(js/console.log "Args:" args)
[:div "Hello"])
(defn main []
(let [ref (react/createRef)]
(js/setTimeout #(js/console.log "Ref:" ref) 3000)
^{:ref ref} [inner]))
When I run it it prints Args: null
and Ref: {current: null}
. I run it using Reagent version 0.8.1
. 😕