This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-01
Channels
- # announcements (7)
- # beginners (30)
- # boot (6)
- # calva (24)
- # cider (8)
- # clj-kondo (8)
- # cljs-dev (16)
- # cljsrn (8)
- # clojure (60)
- # clojure-italy (19)
- # clojure-mexico (6)
- # clojure-nlp (2)
- # clojure-uk (11)
- # clojurescript (36)
- # datomic (11)
- # hoplon (1)
- # juxt (2)
- # kaocha (1)
- # keechma (13)
- # nrepl (1)
- # off-topic (51)
- # reagent (7)
- # rewrite-clj (17)
- # robots (7)
- # shadow-cljs (2)
- # sql (4)
- # testing (1)
- # tools-deps (11)
- # vim (12)
Is there a standardised way of (or example of) creating forwardrefs in reagent? or is it a case of passing an atom through components?
originally, the React devs didn’t think when users used props spread like:
render() {
return <div {...this.props} />;
}
that you want to also pass along the ref
, since refs were usually passed to class components in order to access class-specific methods.
so they made a thing that was separate from propshowever, with functional components and either hooks or ratoms, you usually have no need for refs outside of accessing the DOM so it’s honestly better to have them on props