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

ZeeCoder/react-resize-observer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bf6eb8f · Dec 26, 2022

History

19 Commits
Dec 22, 2018
Dec 22, 2018
Dec 20, 2018
Dec 7, 2018
Dec 20, 2018
Dec 20, 2018
Dec 22, 2018
Dec 20, 2018
Dec 7, 2018
Dec 26, 2022
Dec 7, 2018
Dec 20, 2018
Dec 22, 2018
Dec 7, 2018
Dec 22, 2018

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