title: How to call useQuery hook conditionally?
body: <p>Because of the <a href="https://reactjs.org/docs/hooks-rules.html" rel="noreferrer">Rules of Hooks</a>, one shouldn't call hooks conditionally. So how does one fetch data conditionally using <code>useQuery</code>? For example, let's say I want to fetch data inside a functional component, but only if <code>someState === someValue</code>? i.e I want to avoid calling <code>useQuery()</code> before any conditions because fetching data at these time doesn't make sense.</p>