swr
2.5.1 · 12 Aug 2026MIT28.9M / weekRepositoryHomepagenpmAtom feed
Upgrading swr From 1.1.0 to 1.3.0
6 releases in betweenevery note read
Reading releases, release notes and advisories…
Release by release
- New
Support functional optimisticData
- Fixed
type: Fix type error on SWRConfig
- New
- New
Support
populateCacheas a function - Fixed
Reset stale unmountedRef in suspense
- New
- Fixed
useSWRInfinite revalidates with revalidateOnMount
- Fixed
- New
Optimistic mutation with error rollback
- Fixed
Required return type when mutating
- Fixed
Use the latest reference of fetcher with suspense mode
- New
- New
Ensure auto revalidations are executed after state updates
- New
Add moduleNameMapper to jest
- New
Use the latest reference of fetcher
- New
Add
populateCacheoption tomutate - Fixed
Re-export InfiniteFetcher
- Fixed
Fix local state sharing example deps
- New
- New
refreshInterval as a function
- Fixed
If
newDatais deeply to the latest state, broadcast the latest state - Fixed
Return
undefineddata if key's falsy under suspense mode
- New
7 other lines we could not sort, mostly version bumps
- 1.3.0
bugfix: Make suspense and revalidateIfStale work together
- 1.2.1
shouldRetryOnErroraccepts a function that can be used to conditionally stop retrying - 1.1.2
Make polyfill for
requestAnimationFramemore robust - 1.1.2
type(infinite): export SWRInfinteHook and SWRInfiniteKeyLoader from infinite, rename InfiniteFetcher to SWRInfiniteFetcher
- 1.1.2
Improve test
- 1.1.2
Merge states for concurrent requests
- 1.1.2
Skip error retrying when document is not active and improve tests
24 internal lines (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.