This package has been deprecated

Author message:

Switch to use-resize-observer instead. See the readme at https://github.com/ZeeCoder/react-resize-observer.

@zeecoder/react-resize-observer

2.0.0 • Public • Published

@zeecoder/react-resize-observer

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

npm version build

Install

yarn add @zeecoder/react-resize-observer
# or
npm install --save @zeecoder/react-resize-observer

Usage

const App = () => (
  <ResizeObserver>
    {(ref, width, height) => (
      <div ref={ref}>
        My size is {width}x{height}
      </div>
    )}
  </ResizeObserver>
);

Notes

Related

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @zeecoder/react-resize-observer

Weekly Downloads

210

Version

2.0.0

License

MIT

Unpacked Size

13 kB

Total Files

6

Last publish

Collaborators

  • zeecoder