title: Why React expects me to add setters as useEffects dependencies
body: <p>I am trying to use an async function inside a useEffect callback.</p>
  
  <p>There is a behavior i don't understand (in my case related to the <code>throttle</code> function from lodash).</p>
  
  <p>I don't get what is happing, and how to solve it, here is a sample of the code:</p>
  
  <pre><code>import throttle from 'lodash/throttle';
  
  const myRequestWrapped = throttle(myRequest, 300);
  
  const [name, setName] = useState('');
  
  useEffect(() =&gt; {
      myRequest(name) // No warning
  
      myRequestWrapped(name); // React Hook useEffect has a missing dependency: 'myRequestWrapped'. Either include it or remove the dependency array
  
  }, [ name ]);
  </code></pre>
  
  <p>If i add <code>myRequestWrapped</code> as a dependency, i have an infinite loop (the effect is triggered continuously).</p>
  
  <p>I guess the <code>throttle</code> method works with a timer and it returns a different result at every run so i can understand why the infinite loop.</p>
  
  <p>But i really don't understand why React wants it as a dependency (especially that it works without adding it !).</p>
  
  <p>What is the logic? 
  Why <code>myRequestWrapped</code> and not <code>myRequest</code>?
  Should i ignore the warning or do you know a clean way to solve that?</p>
  
  <p>Thanks.</p>