useResizeObserver

Observe the size and position of an element with a ResizeObserver.

This is custom React hooks, you need to follow the Basic Rules when you use it.

General

Resize the textarea to see its size change.

APIs

useResizeObserver

const useResizeObserver = <T extends HTMLElement = HTMLElement>(
  options?: ResizeObserverOptions,
) => [RefObject<T | null>, UseResizeObserverRect]
Edit this page on GitHub