title: How can I have dynamic function to pass in debounce function
body: <p>I want implement different api search in one React component and I using custom hook.</p>
  <pre><code> const { request:requestOne, data, loading} = useApi(searchOneApiConfig);
   const { request:requestTwo, data, loading} = useApi(searchTwoApiConfig);
   const { request:requestThree, data, loading} = useApi(searchThreeApiConfig);
  </code></pre>
  <p>now I have to use a useCallback(debounce... for each one like:</p>
  <pre><code>const SearchLazyQueryOne = useCallback(debounce(requestOne, DEBOUNCED_TIME, LazyQueryConfig), []);
  const SearchLazyQueryTwo = useCallback(debounce(requestTwo, DEBOUNCED_TIME, LazyQueryConfig), []); 
  const SearchLazyQueryThree = useCallback(debounce(requestThree DEBOUNCED_TIME, LazyQueryConfig), []);
  </code></pre>
  <p>My question is how can I have single &quot;searchLazyQuery&quot; and pass dynamic request function?</p>
  <p>(I'm using Lodash's <a href="https://lodash.dev/docs/4.17.15#debounce" rel="nofollow noreferrer"><code>debounce</code></a>.)</p>