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

A React component that allows you to use a ResizeObserver to measure an element's size.

License

Notifications You must be signed in to change notification settings

ZeeCoder/react-resize-observer

Repository files navigation

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

About

A React component that allows you to use a ResizeObserver to measure an element's size.

Resources

License

Stars

Watchers

Forks

Packages

No packages published