You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/framework/react/guides/query-retries.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ You can configure retries both on a global level and an individual query level.
10
10
- Setting `retry = false` will disable retries.
11
11
- Setting `retry = 6` will retry failing requests 6 times before showing the final error thrown by the function.
12
12
- Setting `retry = true` will infinitely retry failing requests.
13
-
- Setting `retry = (failureCount, error) => ...` allows for custom logic based on why the request failed.
13
+
- Setting `retry = (failureCount, error) => ...` allows for custom logic based on why the request failed. Note that `failureCount` starts at `0` for the first retry attempt.
Copy file name to clipboardExpand all lines: docs/framework/react/reference/useQuery.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,7 @@ const {
84
84
- If `false`, failed queries will not retry by default.
85
85
- If `true`, failed queries will retry infinitely.
86
86
- If set to a `number`, e.g. `3`, failed queries will retry until the failed query count meets that number.
87
+
- If set to a function, it will be called with `failureCount` (starting at `0` for the first retry) and `error` to determine if a retry should be attempted.
87
88
- defaults to `3` on the client and `0` on the server
88
89
-`retryOnMount: boolean`
89
90
- If set to `false`, the query will not be retried on mount if it contains an error. Defaults to `true`.
0 commit comments