We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f184177 commit 4887df6Copy full SHA for 4887df6
src/withBreakpoints.js
@@ -8,11 +8,10 @@ const Context = React.createContext();
8
const debounce = (func, interval) => {
9
let timeout;
10
return (...args) => {
11
- const context = this;
12
- let later = () => {
+ const later = () => {
13
timeout = null;
14
- func.apply(context, args);
15
- }
+ func.apply(this, args);
+ };
16
clearTimeout(timeout);
17
timeout = setTimeout(later, interval);
18
};
0 commit comments