UNPKG

rooks

Version:

Collection of awesome react hooks

14 lines (13 loc) 488 B
import type { RefElementOrNull } from "../utils/utils"; /** * useRefElement hook for React * Helps bridge gap between callback ref and state * Manages the element called with callback ref api using state variable * @returns {[RefElementOrNull, (element: HTMLElementOrNull) => void]} * @see https://rooks.vercel.app/docs/hooks/useRefElement */ declare function useRefElement<T>(): [ (refElement: RefElementOrNull<T>) => void, RefElementOrNull<T> ]; export { useRefElement };