Skip to content

fix(use-swrv): skip debounce for forced revalidation#429

Open
officialasishkumar wants to merge 1 commit into
Kong:masterfrom
officialasishkumar:fix/force-revalidate-skips-debounce
Open

fix(use-swrv): skip debounce for forced revalidation#429
officialasishkumar wants to merge 1 commit into
Kong:masterfrom
officialasishkumar:fix/force-revalidate-skips-debounce

Conversation

@officialasishkumar
Copy link
Copy Markdown

Summary

  • bypass revalidateDebounce when revalidation is explicitly forced through mutate()
  • keep debounced behavior for automatic cached revalidations
  • add a regression test that proves mutate updates immediately and does not schedule a delayed duplicate fetch

Fixes #346.

Validation

  • yarn test use-swrv --runInBand
  • yarn test --runInBand
  • yarn types:check
  • yarn lint --no-fix
  • yarn build

Allow explicit mutate-triggered revalidation to run immediately even when cached data and revalidateDebounce are configured. Automatic cached revalidation still uses the debounce path.

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 23, 2026

👷 Deploy request for docs-swrv pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 0b4c043

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 23, 2026

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

forceRevalidate should have option or default to override debounce

2 participants