{"_id":"@actualwave/use-element-size","_rev":"2-3c50949e0e43f5df2abdc092ede94411","name":"@actualwave/use-element-size","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@actualwave/use-element-size","version":"0.0.1","description":"React hook that watches for updates and returns element size.","main":"index.js","module":"index.js","types":"index.d.ts","keywords":["react","element","size","resize","event","hook"],"peerDependencies":{"react":">=16.8.0","@types/react":">=16.8.0"},"homepage":"https://gist.github.com/burdiuz/9d88b6960552bea7ce5070c0d9549f77","bugs":{"url":"https://gist.github.com/burdiuz/9d88b6960552bea7ce5070c0d9549f77","email":"burdiuz@gmail.com"},"license":"MIT","author":{"name":"Oleg Galaburda","email":"burdiuz@gmail.com","url":"http://actualwave.com/"},"gitHead":"15e08ea1558e6c129c6ef567fdeb047d533ea4bd","_id":"@actualwave/use-element-size@0.0.1","_nodeVersion":"16.4.0","_npmVersion":"7.18.1","dist":{"integrity":"sha512-KKhg1OXKgn+erHY+0R27E0bzdxn/c6+bY+unG8gkLxFEYdSdhX17PvBXorPpQi4CViZzgbSm6ukEEEC853tAVg==","shasum":"a5e1f492d34e9b009586255ac50d67722cc8f2f0","tarball":"https://registry.npmjs.org/@actualwave/use-element-size/-/use-element-size-0.0.1.tgz","fileCount":4,"unpackedSize":3354,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxHmhCRA9TVsSAnZWagAAhdIP/Ri3r57Zd/kvOOZoPHqi\nOwOGBpx6yCHm/mrRHG9f+/mwAW9r6rFcLvzT2mb6bv1pxzaSC3ypLhmeGnn+\ntL2R21mgOJ1ZaPe/5JZtcDEPfYXHcBhSTysC/V7LOrKIEt1CiBUlBVGWT4x4\nBNZkXK7VzJm42MbA8qeEgseAnLeDA5MGI1XRTQ1f869DB+YzzVN2NAERBAiK\nwTRIzq42PlvSQofKElNLrPwiNQkt+6UV3k8cdjG/t0ONCvzgBL02eyW/x6EH\nK8eg0JuRi1iqJr9gDKBr3anHEzrHOJzJ+5tQ97JU+nE24drG18ZIFi4SjeNS\nmI91dbcH8CGy8jSnl7BD/+NYsQ1lQol1cGWzewwFWiA7HzbZuAxW8fjKj53H\nbfvliW83xBS/v1tCCTBNhSBwR+i4BQJB3lzmf3fQNxHs3Buk3Wx6WamgjIr1\nQKL1I45fwkcaYu0cJmIfZQ40AcgCYh7WimaYztse2rS+Z4OBUvT3bRcI/ZfG\nRYnYrAgAmTFPqp76cDm0xvtZOeKOZW7Nlgs/ElgfZ3WvE3yE7uakwjddOz2n\nn4wNmOQEGIHpAcrd87xjavjbi0Jg0EPF/EKvnNZhuRl2nkTB5hm+TMPY996Z\nY2HxoqLa7I0vuq3oH6PfXrWXY5605vYkgH3GXe+gCuSI20YPrT8B2I4q94tb\nBD9V\r\n=LsHq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2ovzjnzj8zTtScN6L0UhY/PPL8DG6Ie2rel3+4QN9ngIhAKs6IxSi58WKWfoUJJo1lwsXYX/m+APP98hIubJHQRIH"}]},"_npmUser":{"name":"actualwave","email":"burdiuz@gmail.com"},"directories":{},"maintainers":[{"name":"actualwave","email":"burdiuz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-element-size_0.0.1_1635779770283_0.17928571729816611"},"_hasShrinkwrap":false}},"time":{"created":"2021-11-01T15:16:10.225Z","0.0.1":"2021-11-01T15:16:10.413Z","modified":"2022-04-04T11:20:16.676Z"},"maintainers":[{"name":"actualwave","email":"burdiuz@gmail.com"}],"description":"React hook that watches for updates and returns element size.","homepage":"https://gist.github.com/burdiuz/9d88b6960552bea7ce5070c0d9549f77","keywords":["react","element","size","resize","event","hook"],"author":{"name":"Oleg Galaburda","email":"burdiuz@gmail.com","url":"http://actualwave.com/"},"bugs":{"url":"https://gist.github.com/burdiuz/9d88b6960552bea7ce5070c0d9549f77","email":"burdiuz@gmail.com"},"license":"MIT","readme":"# @actualwave/use-element-size\nReact hook that watches for changes in element size using ResizeObserver and reports updates forcing component to render.\nThere are two hooks in this package\n * **useResizeObserver**(handlerFn, elementRef) -- Calls `handlerFn()` when element size changed with instance of [DOMRectReadOnly](https://developer.mozilla.org/en-US/docs/Web/API/DOMRectReadOnly).\n * **useElementSize**(elementRef, reinitInEffect = true) -- Returns element size or null if `elementRef.current` does not contain reference to HTMLElement. `reinitInEffect` forces immediate re-render to apply element sizes, expected to have a valid reference at the time of re-render.\n\nExample on [codesandbox.io](https://codesandbox.io/s/react-use-element-size-hook-htq59).\n\n","readmeFilename":"README.md"}