In this patch release, we majorly improved typing support and SWR can infer the types based on the configuration.
suspense option is true, the returned data will exclude undefined and the isLoading will always be false.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:
Full Changelog: https://github.com/vercel/swr/compare/2.0.0...v2.0.1
Fetched April 18, 2026