github vercel/swr 1.1.2-beta.1

latest releases: v2.2.6-beta.4, v2.2.6-beta.3, v2.2.6-beta.2...
pre-release2 years ago

Highlights of This Release

1. More Tests and Better Code Coverage

We now have 23 test suits of 202 total test cases, with a 98.06% test coverage. The core files and main functionalities are now 100% covered. Kudos to @promer94 for improving it!

2. Use the Latest Fetcher Function

SWR will now use the latest fetcher function passed to the hook, when sending the request. Previously it uses the initial snapshotted fetcher.

3. Avoid Unnecessary Auto Revalidations

When refocusing on the window with state changes (like clicking a button that changes the SWR key immediately), SWR now avoids revalidations if they're not necessary. Details can be found in #1720.

4. New Types for useSWRInfinite

Two types for useSWRInfinite are added: SWRInfinteHook and SWRInfinteKeyLoader. You can use them to type the hook and the getKey function.

What's Changed

New Contributors

Full Changelog: 1.1.2-beta.0...1.1.2-beta.1

Don't miss a new swr release

NewReleases is sending notifications on new releases.