use-size-ref
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

useSizeRef

A react-hook that notify the size change of dom element

Install

npm i use-size-ref --save

Usage

import { useSizeRef } from 'use-size-ref';

const [ref, { width, height }] = useSizeRef();

console.log(width, height);
return (<div ref={ref} />)

LICENSE

MIT

Readme

Keywords

Package Sidebar

Install

npm i use-size-ref

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

56.7 kB

Total Files

16

Last publish

Collaborators

  • tli4