-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
docs: clarify that failureCount starts at 0 in retry callback #10031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
docs: clarify that failureCount starts at 0 in retry callback #10031
Conversation
Added clarification that failureCount parameter in the retry callback function starts at 0 for the first retry attempt, not 1. Fixes TanStack#10017
|
📝 WalkthroughWalkthroughTwo documentation files updated to clarify that the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🪛 LanguageTooldocs/framework/react/guides/query-retries.md[style] ~13-~13: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE) docs/framework/react/reference/useQuery.md[style] ~87-~87: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE) 🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Added clarification that
failureCountparameter in the retry callback function starts at0for the first retry attempt, not1.Changes
docs/framework/react/guides/query-retries.md: Added note aboutfailureCountstarting at 0docs/framework/react/reference/useQuery.md: Added explanation for the function variant ofretryoptionThis helps developers understand that on the first retry check,
failureCountwill be0, which can be surprising if not documented.Fixes #10017
Summary by CodeRabbit
failureCountparameter starts at 0 for the first retry attempt and is provided to custom retry functions alongside the error for retry decision-making.✏️ Tip: You can customize this high-level summary in your review settings.