/** * A callback ref hook that supports cleanup functions. * This is useful when you need to perform setup/cleanup operations when the ref changes. * * @param callback - Function that receives the node and optionally returns a cleanup function * @returns A callback ref * * @example * ```tsx * const MyComponent = () => { * const ref = useCallbackRef((node) => { * if (node) { * const handleInput = () => console.log('input changed'); * node.addEventListener('input', handleInput); * * // Return cleanup function * return () => { * node.removeEventListener('input', handleInput); * }; * } * }); * * return ; * }; * ``` */ export declare function useCallbackRef(callback: (node: T | null) => (() => void) | void): React.RefCallback;