PageSourceSearch

https://assets.blocket.se/pkg/frontpage-layout-v2/0.0.151/useInView.js

js blocket.se collected 2026-09-24 17:15:18 UTC 668 bytes, 1 lines download raw bytes

1import{useCallback as e,useEffect as t,useRef as n,useState as r}from"https://assets.finn.no/npm/react/v19/react.production.min.js";function i(i={}){let{threshold:a=.5,root:o=null,once:s=!1,enabled:c=!0,onEnter:l,onExit:u}=i,d=n(null),[f,p]=r(!1),m=n(null),h=n(!1),g=n(l),_=n(u);return t(()=>{g.current=l,_.current=u}),t(()=>{if(!c)return;let e=d.current;if(!e)return;let t=new IntersectionObserver(([e])=>{let n=e.isIntersecting;p(n),n?h.current||(h.current=!0,g.current?.(),s&&t.disconnect()):_.current?.()},{root:o,threshold:a});return t.observe(e),m.current=t,()=>t.disconnect()},[a,o,s,c]),{ref:d,inView:f,stop:e(()=>{m.current?.disconnect()},[])}}export{i as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.