react-dom-resize-observer
Advanced tools
Comparing version 0.2.1 to 1.0.0
{ | ||
"name": "react-dom-resize-observer", | ||
"version": "0.2.1", | ||
"description": "", | ||
"version": "1.0.0", | ||
"description": "React hook implementing the Resize Observer API.", | ||
"main": "./dist/index.js", | ||
@@ -10,3 +10,3 @@ "scripts": { | ||
}, | ||
"author": "Zak Nichols", | ||
"author": "Zakary Nichols", | ||
"license": "MIT", | ||
@@ -13,0 +13,0 @@ "devDependencies": { |
@@ -5,5 +5,5 @@ # React Resize Observer | ||
[![codecov](https://codecov.io/gh/zaknicholsdev/react-dom-resize-observer/branch/develop/graph/badge.svg)](https://codecov.io/gh/zaknicholsdev/react-dom-resize-observer) | ||
[![codecov](https://codecov.io/gh/zakarynichols/react-dom-resize-observer/branch/develop/graph/badge.svg)](https://codecov.io/gh/zaknicholsdev/react-dom-resize-observer) | ||
![Workflow](https://github.com/zaknicholsdev/react-dom-resize-observer/actions/workflows/ci-cd.yml/badge.svg?branch=develop) | ||
![Workflow](https://github.com/zakarynichols/react-dom-resize-observer/actions/workflows/ci-cd.yml/badge.svg?branch=develop) | ||
@@ -27,6 +27,7 @@ | ||
// Callback to disconnect observing completely. | ||
disconnect | ||
disconnect, | ||
// Callback to unobserve a specific element. | ||
unobserve | ||
} = | ||
// Pass the same DOM element type as a type param to help the hook infer the correct types. | ||
useResizeObserver<HTMLDivElement | null>({ | ||
@@ -36,3 +37,3 @@ // You can optionally pass your own ref if you already have one. | ||
// You can optionally pass a callback to access the raw DOM element on resize. | ||
onResize: (el) => { /** Do something with the element... */ }, | ||
onResize: (el) => { /** Access the element on resize... */ }, | ||
}); | ||
@@ -39,0 +40,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
15162
1
47
0