import { RefObject } from 'react'; /** * Watches a ref and re-renders when its value changes. Checks once per frame via * requestAnimationFrame, which is more efficient than setInterval. * * @param ref - The ref to watch for changes. * @param callback - Optional callback invoked whenever the ref's value changes, receiving the new value. * @returns The current value of the ref. The component re-renders whenever the ref's value changes. */ export declare const useWatchRef: (ref: RefObject | null | undefined, callback?: (newValue: T) => void) => T | undefined;