useResizeObserver
Handle the ResizeObserver (opens in a new tab) API.
Type Definitions
const useResizeObserver: <T extends HTMLElement = HTMLDivElement>(args: ResizeObserverOptions & {
handler: ResizeObserverCallback;
ref?: React.RefObject<T> | null;
}) => {
ref: React.RefObject<T>;
observer: React.MutableRefObject<ResizeObserver | undefined>;
};