swr
2.5.1 · 12 Aug 2026MIT26.9M / weekRepositoryHomepagenpmAtom feed
Where each line stands
Plan an upgradeLatest releases
All 84 releases2.5.1
12 Aug 2026Hydrate cacheData for hooks without a fetcher
Revalidate suspense cacheData on remount
Clean up completed subscription state
Patches
Hydrate cacheData for hooks without a fetcher
Revalidate suspense cacheData on remount
Clean up completed subscription state
2.5.0
3 Aug 2026Fixed the
swr/_internalReact Server export so it resolves correctly in the published package
Features
RSC cache preloading
Preload data in React Server Components and pass it to client hooks through
SWRConfig. This avoids a duplicate initial browser request and hydrates the result into the SWR cache. The newcacheDataoption is experimental.New
unload()APIUse
unload()to clear the entire SWR cache and discard in-flight requests and mutations. Mounted hooks revalidate by default, or you can pass{ revalidate: false }to keep the cache empty until the next revalidation.Fixes
Fixed the
swr/_internalReact Server export so it resolves correctly in the published package
2.4.2
22 Jun 2026Guard against double-unsubscribe removing wrong subscriber in cache.ts
Prevent resolved promise to suspend due to missing status
Patches
Guard against double-unsubscribe removing wrong subscriber in cache.ts
Prevent resolved promise to suspend due to missing status
Dependency tracking · free for 3 projects
Know when your own dependencies move
swr published 7 releases in the last 12 months. inlinr folds the routine ones into a line and keeps the few that need you.
Advisories reach you
An email when a critical or high advisory affects a project, before the next install.
Upgrades checked first
Peer ranges, Node, ESM-only and types changes read before you bump.
Only what matters
Majors and breaking notes stay; patches and sibling bumps fold into one line.
Reading releases, release notes and advisories…
Registry facts last checked 11 Nov 2026. Releases and advisories last read 11 Nov 2026.