We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The example in https://swr.vercel.app/docs/error-handling#error-retry calls revalidate with { retryCount: retryCount + 1 }. However, it seems that retryCount is automatically increased before calling onErrorRetry.
{ retryCount: retryCount + 1 }
retryCount
onErrorRetry
If you log retryCount in the above example, you get 1, 3, 5, 7, .... If you remove the + 1 then you get 1, 2, 3, ....
1, 3, 5, 7, ...
+ 1
1, 2, 3, ...
Tested on SWR 0.5.5.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Bug report
Description / Observed Behavior
The example in https://swr.vercel.app/docs/error-handling#error-retry calls revalidate with
{ retryCount: retryCount + 1 }
. However, it seems thatretryCount
is automatically increased before callingonErrorRetry
.If you log
retryCount
in the above example, you get1, 3, 5, 7, ...
. If you remove the+ 1
then you get1, 2, 3, ...
.Additional Context
Tested on SWR 0.5.5.
The text was updated successfully, but these errors were encountered: