Binding to a react component that uses react refs and using the ref


Hey all,

I’m trying to access a ref in a library that I’m binding to and am struggling to understand how to grab ahold of it.

I want to use this:

I think I’m stuck because I don’t understand the proper way to write a binding to ref prop?

EDIT: Posted this too soon, figured it out!


Do you want to share how you did it? :slight_smile:


Yeah, I actually just followed but had to make sure to bind the ref prop to be of type

Js.nullable(ReasonReact.reactRef) => ref(Js.nullable(ReasonReact.reactRef))