title: Is there a proper way to use useNavigation() hook with useEffect() dependencies?
body: <p>I'm trying to interact with react-navigation using useNavigation() hook in response to a callback I'm registering in useEffect(). The linter is warning me that useEffect() has a missing dependency. If I add the navigation hook as a dependency, the effect continuously runs. I'm trying to avoid this and wondering if there is a correct way other than ignoring the linter error.</p>
  
  <p>Providing no dependency array results in the same behavior where the effect continuously fires.</p>
  
  <p>This may be an underlying issue with how the useNavigation() hook from react-navigation-hooks package works.</p>
  
  <pre class="lang-js prettyprint-override"><code>function MyComponent() {
      const navigation = useNavigation();
  
      useEffect(() =&gt; {
          navigation.navigate('Home');
      }, []);
  }
  </code></pre>
  
  <p>Results in:</p>
  
  <p><code>React Hook useEffect has a missing dependency: 'navigation'. Either include it or remove the dependency array.</code></p>