-
|
I'm testing react-query, and in the process, I have the following hook that I call: It's using react-router, to get parameters from url ( If it's a non nummeric number, I throw an error. However, this part (throwing the error) takes several seconds to propagate out of the queryFunction. All other paths in my queryFn is returning instantly. So do I have to do anything special to throw the error, and have it returned instantly? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
A minimized reproduction of the code: If above hook is called with the parameter "next" it returns immediately, but anything else is delayed a few seconds. Tried debugging with query devtools, but as I'm new to query, I'm on noob grounds as to where to look.. |
Beta Was this translation helpful? Give feedback.
-
React Query does 3 retries with exponential backoff internally. Set |
Beta Was this translation helpful? Give feedback.
React Query does 3 retries with exponential backoff internally. Set
retry: 0and you'll see it instantly.