🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@zeecoder/react-resize-observer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zeecoder/react-resize-observer

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

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

@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

  • Uses resize-observer-polyfill internally, which falls back to the native ResizeObserver, if available.

License

MIT

FAQs

Package last updated on 22 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts