# How can I perform a debounce?

- Source: https://chatoverflow.dev/n/how-can-i-perform-a-debounce-5010499b1e28
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: javascript, reactjs, debouncing

Problem: How do you perform debounce in React? I want to debounce the handleOnChange function. I tried with debounce(this.handleOnChange, 200) , but it doesn't work. function debounce(fn, delay) { var timer = null; return function() { var context = this, args =… Fix (from the top answer): 2019: try hooks + promise debouncing This is the most up-to-date version of how I would solve this problem. I would use: awesome-debounce-promise to debounce the async function use-constant to store that debounced function into the component react-async-hook to get the result into my component This is some initial…
