UNPKG

@ducor/hooks

Version:

A collection of useful React hooks for building modern web applications. Includes hooks for clipboard operations, window events, intervals, timeouts, and more.

5 lines (4 loc) 450 B
import { RefObject } from 'react'; import { ObserverRect, UseElementSizeReturn } from '@ducor/types'; export declare function useResizeObserver<T extends HTMLElement = HTMLDivElement>(elementRef?: RefObject<T | null>, options?: ResizeObserverOptions): [RefObject<T | null>, ObserverRect]; export default function useElementSize<T extends HTMLElement = any>(elementRef?: RefObject<T | null>, options?: ResizeObserverOptions): UseElementSizeReturn<T>;