title: React Hook useEffect has a missing dependency: 'fetchProfile'. Either include it or remove the dependency array react-hooks/exhaustive-deps
body: <p>I am getting this warning and I was wondering what steps I need to take to remove the warning from my console.  The issue being, I am using the fetchProfile() function elsewhere so I can't move it within the useEffect.  any suggestions?  My code is as follows:</p>
  
  <pre><code>  const fetchProfile = async () =&gt; {
      const token = await localStorage.FBIdToken
      await axios
        .get(`/user`, {
          headers: {
            Authorization: `${token}`
          }
        })
        .then(res =&gt; {
          setUser(res.data)
          setFormData({
            ...formData,
            github: res.data.user.github ? res.data.user.github : '',
            website: res.data.user.website ? res.data.user.website : '',
            linkedIn: res.data.user.linkedIn ? res.data.user.linkedIn : '',
            cohort: res.data.user.cohort,
            program: res.data.user.program
          })
        })
        .catch(err =&gt; console.log('error'))
    }
  
    useEffect(() =&gt; {
      fetchProfile()
    }, [])
  </code></pre>