title: Use debounce inside a custom React hook for input change
body: <p>I have a custom hook <code>useForm</code>, which stores form values and validates input values.</p>
  
  <pre><code>const { errors, handleChange, values } = useForm();
  </code></pre>
  
  <p><code>handleChange</code> validates on every input change. Is it possible to use debouce inside a custom hook? If yes, how to do it?</p>
  
  <pre><code>const handleChange = (ev) =&gt; {
    ev.persist();
  
    // set value in values state
    const currentError = validate(/* pass params */)
    // update errors state
  };
  </code></pre>