React · Middle · Question 49 of 75
What does TanStack Query do on a query error by default on the client?
- ✓Correct answer: Retries 3 times with increasing delay, then errors
- 2Shows the error immediately without a single retry
- 3Retries the request forever until it succeeds
Explanation
By default retry: 3, and retryDelay grows exponentially. Mutations don't retry by default. Retries are configurable with a function, e.g. don't retry 4xx: retry: (count, err) => err.status >= 500 && count < 3.