UNPKG

@mirawision/reactive-hooks

Version:

A comprehensive collection of 50+ React hooks for state management, UI interactions, device APIs, async operations, drag & drop, audio/speech, and more. Full TypeScript support with SSR safety.

14 lines (13 loc) 485 B
import { RefObject } from 'react'; interface ElementSize { width: number; height: number; } /** * A hook that tracks an element's dimensions using ResizeObserver. * Falls back to {0, 0} if ResizeObserver is not available or element is not mounted. * @param ref React ref object for the element to monitor * @returns Object containing current element width and height */ export declare function useElementSize<T extends Element>(ref: RefObject<T>): ElementSize; export {};