Skip to content

v2.0.1

Compare
Choose a tag to compare
@shuding shuding released this 18 Jan 17:36
· 170 commits to main since this release

In this patch release, we majorly improved typing support and SWR can infer the types based on the configuration.

  • When the suspense option is true, the returned data will exclude undefined and the isLoading will always be false.
  • When the fallbackData option is provided, the returned data will be the same type of fallbackData, and the isLoading will always be false.

Here's a demo for it:

swr-2.0.1.mp4

What's Changed

New Contributors

Full Changelog: 2.0.0...v2.0.1