I would have expected the first parameter of React.useImperativeHandle() (i.e., the reference) to be of type React.ref<Js.Nullable.t<'value>>. This way, the value can be set by React.useImperativeHandle() for its caller.
However, the type is actually Js.Nullable.t<React.ref<'value>> – they are swapped.
If it is null (e.g., initial state), how is React.useImperativeHandle() supposed to set the current member of the reference for the caller?
Thanks in advance