New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@react-hook/resize-observer

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-hook/resize-observer - npm Package Compare versions

Comparing version 0.0.2 to 1.0.0

2

package.json
{
"name": "@react-hook/resize-observer",
"version": "0.0.2",
"version": "1.0.0",
"homepage": "https://github.com/jaredLunde/react-hook/tree/master/packages/resize-observer#readme",

@@ -5,0 +5,0 @@ "repository": "github:jaredLunde/react-hook",

@@ -40,4 +40,4 @@ <hr>

[This approach is astoundingly more performant](https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/z6ienONUb5A/F5-VcUZtBAAJ)
than using an `ResizeObserver` per element, as most hook implementations do.
- [x] Uses [`resize-observer-polyfill`] as a ponyfill when `ResizeObserver` isnt' supported
than using a `ResizeObserver` per element which most hook implementations do.
- [x] Uses [`resize-observer-polyfill`](https://github.com/que-etc/resize-observer-polyfill) as a ponyfill when `ResizeObserver` isnt' supported
by the current browser.

@@ -65,3 +65,2 @@ - [x] Automatically unobserves the target element when the hook unmounts.

useResizeObserver(target, (entry) => setSize(entry.contentRect))
return size

@@ -68,0 +67,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc