import * as React from 'react'; /** * Since react ref may Function-based or Ref-based * * Provide this hook to get Ref-based and Function-based in custom component * * * Usage: * * function View(props) { * const { hostRef, ref } = convertRef(props.forwardedRef) * * const onClick = useCallback(() => { * hostRef.current?.focus() * }) * * return
; * } * * const App = React.forwardRef((props, ref) => ( *