( ref: RefObject<DOMRefValue<T> | null> )
| 56 | } |
| 57 | |
| 58 | export function unwrapDOMRef<T extends HTMLElement>( |
| 59 | ref: RefObject<DOMRefValue<T> | null> |
| 60 | ): RefObject<T | null> { |
| 61 | return { |
| 62 | get current() { |
| 63 | return ref.current && ref.current.UNSAFE_getDOMNode(); |
| 64 | } |
| 65 | }; |
| 66 | } |
| 67 | |
| 68 | export function useUnwrapDOMRef<T extends HTMLElement>( |
| 69 | ref: RefObject<DOMRefValue<T> | null> |
no outgoing calls
no test coverage detected