From 6821965bb6c79160f0b83d5403da030d5f6f1a37 Mon Sep 17 00:00:00 2001 From: AwondoFru <47967289+AwondoFru@users.noreply.github.com> Date: Thu, 18 Feb 2021 21:32:26 +0100 Subject: [PATCH] Added debounce time as a prop The debounce is added as a prop so as to permit users to specify their own debounce time --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 6fb1bd7..f6a99f6 100644 --- a/src/index.js +++ b/src/index.js @@ -11,7 +11,7 @@ class WindowSizeListener extends React.Component { super(props); this.displayName = "WindowSizeListener"; this._listeners = []; - this.DEBOUNCE_TIME = 100; + this.DEBOUNCE_TIME = this.props.debounceTime; this.onResize = this.onResize.bind(this); }