title: Correct/Incorrect to ignore some React useEffect dependency warnings?
body: <p>Here's some sample code I've written that works fine:</p>
  
  <pre><code>useEffect(() =&gt; {
    if (!rolesIsLoading &amp;&amp; rolesStatus === 200) {
      customer.roles = rolesData.roles;
    }
  }, [rolesIsLoading, rolesStatus]);
  </code></pre>
  
  <p>I'm getting this warning in the console:</p>
  
  <blockquote>
    <p>React Hook useEffect has missing dependencies: 'customer.roles' and 'rolesData.roles'. Either include them or remove the dependency array                                                                                                                                                                   react-hooks/exhaustive-deps</p>
  </blockquote>
  
  <p>The thing is, the code works fine now and, in some cases, when I add such dependencies, as instructed, I end up with an endless loop or some other problem.</p>
  
  <p>I'd appreciate any advice you might have as to how you resolved this when you've encountered a similar situation.</p>