isRefObject
Checks if a given value is of type RefObject
.
- @param
value
- The value to check. - @returns
true
if the value is of typeRefObject
,false
otherwise.
Example
const ref = useRef<HTMLDivElement>(null)
isRefObject(ref) // true
isRefObject({}) // false
isRefObject(window) // false