This gives me the error: Type 'MutableRefObject<Toast | undefined>' is not assignable to type 'LegacyRef<Toast> | undefined'.
I know I should initialize useRef with null, but I don't know how to do that with useBetween. I didn't find any examples with useRef, though it's listed as a supported hook.
See following simple example code:
This gives me the error:
Type 'MutableRefObject<Toast | undefined>' is not assignable to type 'LegacyRef<Toast> | undefined'.
I know I should initializeuseRef
withnull
, but I don't know how to do that withuseBetween
. I didn't find any examples with useRef, though it's listed as a supported hook.How can I do this?