I ran into a situation where I needed a MutableObjectRef in a child component so I could set the .current property manually--I was wrapping an old component that provides a function callback to get the html node element.
However, I could not do that without a cast in React.forwardRef as React.Ref includes React.RefObject but does not React.MutableObjectRef.
Thoughts?
I ran into a situation where I needed a MutableObjectRef in a child component so I could set the .current property manually--I was wrapping an old component that provides a function callback to get the html node element.
However, I could not do that without a cast in React.forwardRef as React.Ref includes React.RefObject but does not React.MutableObjectRef.
Thoughts?