lndsld

Home > @lndsld/react-hooks > useResize

useResize() function

Subscribe to element’s resize

Signature:

declare function useResize(ref: RefObject<HTMLElement>, options?: UseResizeOptions): DOMRect | undefined;

Parameters

Parameter Type Description
ref RefObject<HTMLElement>  
options UseResizeOptions (Optional)

Returns:

DOMRect | undefined