useQuery triggers before calling it?
Hi again, so I have a login function that takes some credentials and then passes it to a login mutation that send it to a "/login" endpoint, after that I extracted the "isLoading" property from the mutation and I use it for the query that gets the user, the thing is I want to make the query enabled only when that property is true.
=> Here is that line of code: enabled: !isLoading
But the query seems to trigger first thing when I get into the page, I tried making all the refetch properties to false like "refetchOnWindowFocus", "retry", "refretchInterval" and so on but it doesn't work.
Any tips guys
=> Here is that line of code: enabled: !isLoading
But the query seems to trigger first thing when I get into the page, I tried making all the refetch properties to false like "refetchOnWindowFocus", "retry", "refretchInterval" and so on but it doesn't work.
Any tips guys