title: Is there an equivalent of a dependency array for useMutation?
body: <p>I have a custom hook called <code>useAxios</code>. This is actually a wrapper for a <code>useQuery</code> hook that either returns the cached axios instance, or creates a new one by refreshing the JWT.</p>
  <p>Now if I create a mutation that relies on this axios instance:</p>
  <pre><code>export function useExampleMutation() {
    const axios = useAxios();
    return useMutation((thing) =&gt; 
       axios.post(`/do-something-cool/${thing}`)
    )
  }
  </code></pre>
  <p>Now, as far as I understand, when I use it, the mutate function
  is referentially stable:</p>
  <pre><code>export function ExampleComponent() {
  
    const exampleMutation = useExampleMutation();
  
    useEffect(() =&gt; {
      // ...
    }, [exampleMutation.mutate]) //
    //                  ^^^^^^ This is referentially stable 
  
    return &lt;div&gt;...&lt;/div&gt;
  }
  </code></pre>
  <p>So the useEffect hook won't be triggered with every render.</p>
  <p>But I wouldn't want this to be the case if the token is refreshed and I get a brand new axios instance. So how would I specify that I should get a new instance whenever it does like if it were a regular callback:</p>
  <pre><code>export function useExampleCallback() {
    const axios = useAxios();
    return useCallback((thing) =&gt; 
       axios.post(`/do-something-cool/${thing}`), 
    [axios])
  }
  </code></pre>