@studio-freight/react-locomotive-scroll
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -12,6 +12,7 @@ import { LocomotiveScrollOptions, Scroll } from 'locomotive-scroll'; | ||
watch: DependencyList | undefined; | ||
debounce: number; | ||
} | ||
export declare function LocomotiveScrollProvider({ children, options, containerRef, watch, }: WithChildren<LocomotiveScrollProviderProps>): JSX.Element; | ||
export declare function LocomotiveScrollProvider({ children, options, containerRef, watch, debounce }: WithChildren<LocomotiveScrollProviderProps>): JSX.Element; | ||
export declare namespace LocomotiveScrollProvider { | ||
var displayName: string; | ||
} |
@@ -13,7 +13,7 @@ "use strict"; | ||
}); | ||
function LocomotiveScrollProvider({ children, options, containerRef, watch, }) { | ||
function LocomotiveScrollProvider({ children, options, containerRef, watch, debounce = 1000 }) { | ||
const { height: containerHeight } = (0, use_resize_observer_1.default)({ ref: containerRef }); | ||
const [isReady, setIsReady] = (0, react_1.useState)(false); | ||
const LocomotiveScrollRef = (0, react_1.useRef)(null); | ||
const [height] = (0, use_debounce_1.useDebounce)(containerHeight, 100); | ||
const [height] = (0, use_debounce_1.useDebounce)(containerHeight, debounce); | ||
if (!watch) { | ||
@@ -20,0 +20,0 @@ console.warn('react-locomotive-scroll: you did not add any props to watch. Scroll may have weird behaviours if the instance is not updated when the route changes'); |
{ | ||
"name": "@studio-freight/react-locomotive-scroll", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "A locomotive-scroll React wrapper", | ||
@@ -8,4 +8,7 @@ "main": "module/index.js", | ||
"typings": "module/index.d.ts", | ||
"repository": "git@github.com:toinelin/react-locomotive-scroll.git", | ||
"author": "Antoine <contact@antoinelin.com>", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/studio-freight/react-locomotive-scroll" | ||
}, | ||
"author": "arzafran <franco@studiofreight.com>", | ||
"license": "MIT", | ||
@@ -72,3 +75,10 @@ "keywords": [ | ||
"react": "^17.0.2" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/toinelin/react-locomotive-scroll/issues" | ||
}, | ||
"homepage": "https://github.com/toinelin/react-locomotive-scroll#readme", | ||
"directories": { | ||
"lib": "lib" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
22535
356
0
1
0
1