Download Latest Version v.2.5.0 source code.zip (392.7 kB)
Email in envelope

Get an email when there's a new version of SWR

Home / v2.5.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-08-03 970 Bytes
v.2.5.0 source code.tar.gz 2026-08-03 245.3 kB
v.2.5.0 source code.zip 2026-08-03 392.7 kB
Totals: 3 Items   639.0 kB 1

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 new cacheData option is experimental.

https://github.com/vercel/swr/pull/4275

New unload() API

Use 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.

https://github.com/vercel/swr/pull/4298

Fixes

New Contributors

Full Changelog: https://github.com/vercel/swr/compare/v2.4.2...v2.5.0

Source: README.md, updated 2026-08-03