Why is using throttle for search a mistake?
Because throttle runs during typing, causing multiple API calls (e.g., 2-3 calls for typing 'hello'). Debounce waits for typing to stop, making only 1 call. Use debounce for search.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in Debounce vs Throttle: Common Mistakes
Because debounce delays execution until scrolling stops. The user sees no feedback during scrolling, which feels laggy. Use throttle instead for continuous feedback at a controlled rate.
Because the returned function may be called in a different context (e.g., as an event listener). Without fn.apply(this, args), the original function loses its this binding and arguments. Always use apply and rest/spread.
Add a cancel method: debounced.cancel = () => clearTimeout(timer). In useEffect: return () => debounced.cancel(). This clears the timer when the component unmounts.
Still have questions?
Browse all our FAQs or reach out to our support team
