lndsld

Home > @lndsld/react-hooks > useDomRect

useDomRect() function

Subscribe to changes of element’s DOMRect

Signature:

declare function useDomRect(ref: RefObject<HTMLElement>): DOMRect | undefined;

Parameters

Parameter Type Description
ref RefObject<HTMLElement>  

Returns:

DOMRect | undefined