-
Notifications
You must be signed in to change notification settings - Fork 7
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
Enable retries in react-query #56
Enable retries in react-query #56
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
d9925ec
to
d942916
Compare
📦 Size Report
|
🖼️ Visual Regression Report for e2e🟨 Visual changes detected. Please review the report!
This report was generated by comparing 00b328d with baf1a77.Compare. |
4859db2
to
ad41ac7
Compare
ad41ac7
to
c7362bc
Compare
@@ -7,7 +7,8 @@ export const queryClient = new QueryClient({ | |||
queries: { | |||
gcTime: 1_000 * 60 * 60 * 24, // 24 hours | |||
refetchOnWindowFocus: true, | |||
retry: 0, | |||
retry: 3, | |||
retryDelay: (attemptIndex) => Math.min(150 * 2 ** attemptIndex, 10_000), // reduce the base delay to 150ms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why Math.min? it will be always below 10s with 3 retries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in case someone overrides the retry prop
react-query
to 3createSandboxConnector
function.