Home

Awesome

@zeecoder/react-resize-observer

This package is now officially deprecated.
Use the use-resize-observer hook instead.

If you want the old API, then create a react component, like so:

import useResizeObserver from "use-resize-observer";

export default function({ children }) {
  const { ref, width, height } = useResizeObserver();

  return children(ref, width, height);
}

Alternatively, see the last readme for v2 here.