Closed TylerRick closed 1 year ago
Example:
const debounceFunc = debounce(1000, async (num) => { console.log('num:', num); }); debounceFunc(1)
Results in error:
Uncaught TypeError: Cannot read property 'apply' of undefined
I guess I'll be trying out https://www.npmjs.com/package/debounce-promise instead...
Your parameter order is wrong. The first parameter is a function. Try this code.
const debounceFunc = debounce(async (num) => { console.log('num:', num); }, 1000); debounceFunc(1)
Example:
Results in error:
I guess I'll be trying out https://www.npmjs.com/package/debounce-promise instead...