react-on-sticky
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "react-on-sticky", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A React implementation for position:sticky events", | ||
@@ -5,0 +5,0 @@ "author": "@ezekielaquino", |
@@ -107,3 +107,5 @@ # react-on-sticky | ||
function MyStickyElement() { | ||
const [ isStuck ] = useOnSticky(); | ||
const id = "someId"; | ||
// important: you need to pass in a unique id | ||
const [ isStuck ] = useOnSticky(id); | ||
@@ -117,2 +119,3 @@ useEffect(() => { | ||
className="sticky" | ||
id={id} // important: you need to pass in a unique id | ||
style={{ | ||
@@ -119,0 +122,0 @@ position: 'sticky', |
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
25790
128
0