Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-intersection-observer-hook

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-intersection-observer-hook - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

dist/react-intersection-observer-hook.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";var r=require("react"),e=null,t="0px",n=[0];function o(o){var i=void 0===o?{}:o,s=i.root,c=void 0===s?e:s,u=i.rootMargin,a=void 0===u?t:u,v=i.threshold,f=void 0===v?n:v,l=r.useRef(),d=r.useState(),b=d[0],h=d[1];return r.useEffect((function(){return function(){var r=l.current;r&&r.disconnect()}}),[]),[r.useCallback((function(r){var e=(l.current||(l.current=new IntersectionObserver((function(r){h(r[0])}),{root:c,rootMargin:a,threshold:f})),l.current);e.disconnect(),r&&e.observe(r)}),[c,a,f]),{entry:b}]}exports.useIntersectionObserver=o,exports.useTrackVisibility=function(r){var e=o(r),t=e[1].entry;return[e[0],{isVisible:Boolean(t&&t.isIntersecting)}]};
"use strict";var r=require("react"),e=[0];function t(t){var n=void 0===t?{}:t,o=n.root,i=void 0===o?null:o,s=n.rootMargin,c=void 0===s?"0px":s,u=n.threshold,a=void 0===u?e:u,v=r.useRef(),f=r.useState(),l=f[0],d=f[1];return r.useEffect((function(){return function(){var r=v.current;r&&r.disconnect()}}),[]),[r.useCallback((function(r){var e=(v.current||(v.current=new IntersectionObserver((function(r){d(r[0])}),{root:i,rootMargin:c,threshold:a})),v.current);e.disconnect(),r&&e.observe(r)}),[i,c,a]),{entry:l}]}exports.useIntersectionObserver=t,exports.useTrackVisibility=function(r){var e=t(r),n=e[1].entry;return[e[0],{isVisible:Boolean(n&&n.isIntersecting)}]};
//# sourceMappingURL=react-intersection-observer-hook.cjs.production.min.js.map
{
"name": "react-intersection-observer-hook",
"version": "1.0.2",
"version": "1.0.3",
"license": "MIT",

@@ -5,0 +5,0 @@ "author": "onderonur",

Sorry, the diff of this file is not supported yet

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