useRect
Track the bounding DOMRect (opens in a new tab) of a target element.
Type Definitions
const useRect: <T extends HTMLElement = HTMLDivElement>(ref?: React.RefObject<T> | null) => {
ref: React.RefObject<T>;
rect: DOMRect | undefined;
};