Skip to content
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

onDiscarded is never called #2979

Open
alexjidras opened this issue Jun 6, 2024 · 0 comments
Open

onDiscarded is never called #2979

alexjidras opened this issue Jun 6, 2024 · 0 comments

Comments

@alexjidras
Copy link

alexjidras commented Jun 6, 2024

Bug report

Description / Observed Behavior

swr doesn't call onDiscarded callback. Request is deduplicated but onDiscarded is never called.

Expected Behavior

swr should call onDiscarded callback.

Repro Steps / Code Example

CodeSandbox

Additional Context

SWR version - 2.2.4^
React version - 16 and 18 tested and both fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant