Fork me on GitHub
#clojurescript
<
2022-11-13
>
Benjamin14:11:33

What is the best way to "get a reference" to a dom element when I use reagent? The element in question is generated by reagent. I know there is something with form 3 where I can say "on component mounted".

p-himik14:11:46

React refs.

👍 1
p-himik19:11:10

{:deprecated "1.2.0"}

borkdude19:11:49

yeah, I saw that. probably because refs?

p-himik19:11:26

As far as I'm aware, dom-node doesn't provide anything that refs can't provide already. And refs are more than that - they're part of the life cycle of a component, and they can refer to a component that doesn't have any DOM nodes.

👍 1