Packages

swr

2.5.1 · 12 Aug 2026MIT28.9M / weekRepositoryHomepagenpmAtom feed

Your version

2.2.0

22 Jun 2023Where it was published

2.5.1 is the newest release of 2.x.

In short

1 removed3 new9 fixed1 changed17 internal

  • Removed

    Remove startTransition so mutation hook could update immediately

Release note

What's Changed

  • Use React.use API

  • Improve preload and suspense integration

  • Add react-server bundle for core and infinite

  • Removed

    Remove startTransition so mutation hook could update immediately

  • keepPreviousData should also work in suspense

  • Do unsubscribe synchronously

  • Reset the error when mutate succeeded

  • Fix mutation types order

  • Conditional Typing in useSWRMutation to Allow Optional ExtraArg Without Explicitly Passing Undefined

  • Pass displayed data as second parameter of functional optimistic data

  • Adjust rsc exports

  • Revert "fix: remove startTransition so mutation hook could update immediately (#2654)"

  • types: Fix immutable export paths

  • types: Improve useSWRMutation type.

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.