State Management · Middle · Question 32 of 75
What does TanStack Query do on a failed query by default?
- ✓Correct answer: Retries 3 times with exponential backoff before showing an error
- 2Shows the error immediately
- 3Retries forever until it succeeds
Explanation
retry: 3 with a growing retryDelay. Mutations aren't retried by default. You can skip retries for 4xx: retry: (count, err) => err.status >= 500 && count < 3.