Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Latest commit

 

History

History
18 lines (12 loc) · 589 Bytes

README.md

File metadata and controls

18 lines (12 loc) · 589 Bytes

@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.