-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Open
Description
Link to the code that reproduces this issue
https://github.com/matthewca/revalidatetag-swr-issue
To Reproduce
- npm run build
- npm run start
- open localhost:3000/en/demo
- POST to localhost:3000/api/demo/clear
- refresh localhost:3000/en/demo
Current vs. Expected behavior
After revalidating the tag and refreshing the demo page, I expected to see the stale data instantly.
Instead, the page seems to wait until the new data is received before displaying the old stale data in the component. Refreshing once more reveals the new data.
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #35~22.04.1-Ubuntu SMP Mon May 26 18:08:30 UTC 2025
Available memory (MB): 7945
Available CPU cores: 2
Binaries:
Node: 22.17.0
npm: 9.8.1
Yarn: 1.22.22
pnpm: 10.13.1
Relevant Packages:
next: 16.0.1 // Latest available version is detected (16.0.1).
eslint-config-next: N/A
react: 19.2.0
react-dom: 19.2.0
typescript: 5.9.3
Next.js Config:
output: N/AWhich area(s) are affected? (Select all that apply)
cacheComponents
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels