Hi there. How do I use the new useRef hook to attach a ref to a DOM node? this github issue is the only example I found so far, but it fails when I try to pass my ref
to a div
because the types don’t match and I get this error:
Error: This expression has type
React.Ref.t(Js.Nullable.t(ref(option(Dom.element))))
but an expression was expected of type ReactDOMRe.domRef
and I am not sure what I need to pass that would be of type ReactDOMRe.domRef
. Any help is appreciated
GitHub
Refs in reason-react-native · Issue #419 · reasonml-community/bs…
Bringing this over from Discord as requested by @MoOx. I'm basically not sure if this is the right way to use refs and if the external I've defined in the following example should b…