Socket
Socket
Sign inDemoInstall

react-on-sticky

Package Overview
Dependencies
2
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.3 to 0.0.4

2

package.json
{
"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',

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc