title: useEffect exhaustive-deps rule is confusing
body: <p>I have found a few questions related to this on stackoverflow, but nothing that satisfies a use-case which I have very regularly while using <code>useEffect</code>. Let's say I have some code like this:</p>
  <pre class="lang-js prettyprint-override"><code>const ApiViewer = (props) =&gt; {
      const [result, setResult] = useState('')
  
      useEffect(async () =&gt; {
          setResult(await callApi(props.valueThatWillChangeButIOnlyCareAboutItsInitialValue))
      }, [])
  
      return &lt;div&gt;{result}&lt;/div&gt;
  } 
  </code></pre>
  <p>The <code>exhaustive-deps</code> rule will throw, asking me to put <code>props.valueThatWillChangeButIOnlyCareAboutItsInitialValue</code> in the dependency array. I don't want to do this as I only want the initial value. I may use that prop in a separate effect somewhere.</p>
  <p>I can't think of another way to write this either.</p>
  <p>I also have the problem that other people seem to have, i.e. using functions/etc that I know will never change. I don't want to add them to this array, seems very dumb.</p>
  <p>Dan Abramov said that <strong>Usually disabling it is a mistake and will significantly bite you later</strong>. I've been using it this way for years and I've seen no issues until this rule started popping up in a new project.</p>
  <p>Am I using React completely wrong?</p>
  <p>Edit: I've read through <a href="https://github.com/facebook/create-react-app/issues/6880" rel="nofollow noreferrer">this</a> thread more thoroughly, and have concluded that Dan Abramov really cares about programmers because he wants them to <a href="https://www.doc.ic.ac.uk/%7Esusan/475/unmain.html" rel="nofollow noreferrer">have a job for life</a>! I am removing this rule from my projects now.</p>