Should you use debounce or throttle for a search input?
Debounce. Wait for the user to stop typing, then make the API call. This avoids calling the API on every keystroke. 300ms is a good delay.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in When to Use Debounce vs Throttle
Throttle. The user needs continuous feedback while scrolling. Debounce would delay the update until scrolling stops, which feels laggy. Throttle limits to once every 100ms.
Either. Debounce if you want to recalculate after resizing stops (simpler, one calculation). Throttle if you want to update during resizing (smoother feedback, but more calculations). Debounce is more common.
Debounce. Wait for the user to stop editing, then save. This avoids saving on every keystroke. 1000ms is a good delay (save 1 second after editing stops).
Still have questions?
Browse all our FAQs or reach out to our support team
