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

@studio-freight/react-locomotive-scroll

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@studio-freight/react-locomotive-scroll - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

3

module/LocomotiveScroll.context.d.ts

@@ -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

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