Skip to content

Releases: vercel/swr

v2.5.1

Choose a tag to compare

@huozhi huozhi released this 12 Aug 14:39
7173e55

Patches

Misc

New Contributors

Full Changelog: v2.5.0...v2.5.1

v.2.5.0

Choose a tag to compare

@huozhi huozhi released this 03 Aug 14:54
8b9bb97

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.

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

#4298

Fixes

  • Fixed the swr/_internal React Server export so it resolves correctly in the published package by @pengshenghai in #4272

New Contributors

Full Changelog: v2.4.2...v2.5.0

v2.5.0-beta.1

v2.5.0-beta.1 Pre-release
Pre-release

Choose a tag to compare

@huozhi huozhi released this 15 Jul 10:12
fc7ac11

Feature

Full Changelog: v2.5.0-beta.0...v2.5.0-beta.1

v2.5.0-beta.0

v2.5.0-beta.0 Pre-release
Pre-release

Choose a tag to compare

@huozhi huozhi released this 07 Jul 15:45
5c333ad

Features

  • feat: rsc fetches and prefill swr cache by @huozhi in #4275

Patches

New Contributors

Full Changelog: v2.4.2...v2.5.0-beta.0

v2.4.2

Choose a tag to compare

@huozhi huozhi released this 22 Jun 17:46
f1c1fd8

Patches

  • fix: guard against double-unsubscribe removing wrong subscriber in cache.ts by @tomohiro86 in #4252
  • Prevent resolved promise to suspend due to missing status by @devjiwonchoi in #4271

Chores

New Contributors

Full Changelog: v2.4.1...v2.4.2

v2.4.1

Choose a tag to compare

@huozhi huozhi released this 22 Jun 17:44

Patches

New Contributors

Full Changelog: v2.4.0...v2.4.1

v2.4.0

Choose a tag to compare

@shuding shuding released this 01 Feb 03:02

What's Changed

  • chore: Migrate suspense related tests to e2e by @promer94 in #4204
  • CI: add missing flag for canary test by @promer94 in #4206
  • fix: Ensure useSWRImmutable overrides global refreshInterval by @CODEAbhinav-art in #4208
  • fix: Extra render when changing to new key with useSWRImmutable by @promer94 in #4209
  • fix: isHydration will cause unnecessary rerender by @promer94 in #4212
  • fix: Ensure preload runs only on client by @Copilot in #4213

New Contributors

Full Changelog: v2.3.8...v2.4.0

v2.3.8

Choose a tag to compare

@shuding shuding released this 15 Dec 18:52

What's Changed

New Contributors

Full Changelog: v2.3.7...v2.3.8

v2.3.7

Choose a tag to compare

@shuding shuding released this 28 Nov 20:29

What's Changed

Full Changelog: v2.3.6...v2.3.7

v2.3.6

Choose a tag to compare

@huozhi huozhi released this 11 Aug 15:54

Patches

  • fix: do not error when not enabled during suspense by @huozhi in #4156

Full Changelog: v2.3.5...v2.3.6