Resize observer
EuiResizeObserver is a wrapper around the Resizer Observer API which allows watching for changes to the content rectangle of DOM elements. Unlike EuiMutationObserver, EuiResizeObserver does not take parameters, but it does fire a more efficient and informative callback when resize events occur.
This is a render prop component, EuiResizeObserver will pass a ref callback which you must put on the element you wish to observe.
Loading...
useResizeObserver hook
There is also a React hook, useResizeObserver, which provides the same observation functionality.
Loading...