The Wayback Machine - https://web.archive.org/web/20200917004948/https://github.com/ZeeCoder/react-resize-observer
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

@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

About

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

Resources

License

Packages

No packages published
You can’t perform that action at this time.