title: Next js routing triggers useEffect
body: <p>I'm trying to fetch data inside useEffect using axios but it fetches the data everytime I change the page. Is there a way to not trigger useEffect when changing the page? I tried to use shawllow push but it didn't work. I can't fetch on server side because I use next/router inside axios interceptor. </p>
  
  <pre><code>   import { useRouter } from 'next/router';
     const router = useRouter();
     router.push('/', '/', { shallow: true })
  </code></pre>
  
  <p>With the above code, it will trigger useEffect when switching routes. </p>
  
  <pre><code>  useEffect(() =&gt; {
      fetch.get('/endpoint').then(response =&gt; {
       // do stuff
      });
    }, []);
  </code></pre>