Replies: 2 comments
-
That change was made here: #2212 Without the check that throws an error, anyone using the return value from Out of curiosity, why are you calling refetch in useEffect at all? The hook should automatically fetch your data when its argument changes, as long as it's not skipToken. |
Beta Was this translation helpful? Give feedback.
0 replies
-
aha, I see. I call it in useEffect because of the dependencies. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys,
I have this piece of code
and I noticed that it causes an error:
Error: Cannot refetch a query that has not been started yet.
I understand that it seems that I have no transactionId and no safe.chainId and because of this my query ends up being uninitialized. So I modified it to this:
and it works fine. However that feels a bit verbose & unexpected? I honestly would have expected that this would just ignore the fetch? I mean if the reason for failure is because I've told rtkquery to skip the query unless there is transctionId && chainId, why wouldn't it do the same when I have a refetch call?
Beta Was this translation helpful? Give feedback.
All reactions