title: How to resend a query with useQuery based on different state?
body: <p>So my example:</p>
  <pre><code>const Component = () =&gt; {
    const [param, setParam] = useState('defaul')
    const { isLoading, isError, data } = useQuery('data', () =&gt; fetch(`https://test.com?param=${param}`)
  
    ....
  }
  </code></pre>
  <p>For example, I will change param state in someplace and I want to fetch a date with this updated param. I want to resend the API call each time the param state is changing. How can I achieve this?</p>
  <p>P.S. Im using <a href="https://react-query.tanstack.com/" rel="nofollow noreferrer">React Query</a> lib</p>