You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-infinite-scroll-hook

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-infinite-scroll-hook - npm Package Compare versions

Comparing version

to
5.0.0

LICENSE

2

dist/index.d.ts

@@ -13,3 +13,3 @@ import { IntersectionObserverHookRefCallback, IntersectionObserverHookRootRefCallback, IntersectionObserverHookArgs } from 'react-intersection-observer-hook';

hasNextPage: boolean;
onLoadMore: VoidFunction;
onLoadMore: () => unknown;
disabled?: boolean;

@@ -16,0 +16,0 @@ delayInMs?: number;

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

"use strict";var n=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var U=(o,e)=>{for(var t in e)n(o,t,{get:e[t],enumerable:!0})},u=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of H(e))!S.call(o,l)&&l!==t&&n(o,l,{get:()=>e[l],enumerable:!(i=b(e,l))||i.enumerable});return o};var y=o=>u(n({},"__esModule",{value:!0}),o);var d={};U(d,{default:()=>g});module.exports=y(d);var c=require("react"),f=require("react-intersection-observer-hook"),C=100;function m({loading:o,hasNextPage:e,onLoadMore:t,rootMargin:i,disabled:l,delayInMs:r=C}){let[k,{rootRef:I,isVisible:p}]=(0,f.useTrackVisibility)({rootMargin:i}),s=!l&&!o&&p&&e;return(0,c.useEffect)(()=>{if(s){let R=setTimeout(()=>{t()},r);return()=>{clearTimeout(R)}}},[t,s,r]),[k,{rootRef:I}]}var a=m;var g=a;
"use strict";var i=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var U=(o,e)=>{for(var t in e)i(o,t,{get:e[t],enumerable:!0})},y=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of H(e))!S.call(o,l)&&l!==t&&i(o,l,{get:()=>e[l],enumerable:!(n=p(e,l))||n.enumerable});return o};var C=o=>y(i({},"__esModule",{value:!0}),o);var d={};U(d,{default:()=>k});module.exports=C(d);var r=require("react"),a=require("react-intersection-observer-hook"),m=100;function g({loading:o,hasNextPage:e,onLoadMore:t,rootMargin:n,disabled:l,delayInMs:s=m}){let c=(0,r.useRef)(t),[b,{rootRef:R,isVisible:I}]=(0,a.useTrackVisibility)({rootMargin:n});(0,r.useEffect)(()=>{c.current=t},[t]);let f=!l&&!o&&I&&e;return(0,r.useEffect)(()=>{if(f){let u=setTimeout(()=>{c.current()},s);return()=>{clearTimeout(u)}}},[f,s]),[b,{rootRef:R}]}var k=g;
{
"name": "react-infinite-scroll-hook",
"version": "5.0.0-alpha.0",
"version": "5.0.0",
"description": "A simple hook to create infinite scroll components",

@@ -17,3 +17,3 @@ "keywords": [

"type": "git",
"url": "https://github.com/onderonur/react-infinite-scroll-hook.git"
"url": "git+https://github.com/onderonur/react-infinite-scroll-hook.git"
},

@@ -41,19 +41,25 @@ "license": "MIT",

"scripts": {
"attw:check": "attw --pack .",
"build": "tsup",
"dev": "tsup --watch",
"lint": "eslint src --max-warnings 0",
"lint:fix": "eslint src --fix --max-warnings 0",
"lint:check": "eslint . --max-warnings 0",
"lint:fix": "eslint . --fix --max-warnings 0",
"prepublishOnly": "npm run build",
"typecheck": "tsc"
"publint:check": "publint",
"types:check": "tsc"
},
"dependencies": {
"react-intersection-observer-hook": "^3.0.0-alpha.0"
"react-intersection-observer-hook": "^3.0.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.4",
"@repo/eslint-config": "*",
"@repo/lint-staged-config": "*",
"@repo/typescript-config": "*",
"@types/react": "^18.2.74",
"react": "^18.2.0",
"tsup": "^8.0.2",
"typescript": "^5.4.4"
"@types/react": "^18.3.3",
"eslint": "^8.57.0",
"publint": "^0.2.10",
"react": "^18.3.1",
"tsup": "^8.2.4",
"typescript": "^5.5.4"
},

@@ -60,0 +66,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet