{"library":"swr","type":"library","category":null,"description":"SWR is a lightweight and performant React Hooks library for remote data fetching, currently at version 2.4.1. It implements the 'stale-while-revalidate' cache invalidation strategy, popularized by HTTP RFC 5861, to provide an always-fresh and responsive user interface. Maintained by Vercel, SWR ensures components receive a continuous stream of data updates automatically. It offers robust features like built-in caching, request deduplication, real-time revalidation on focus/network recovery, polling, pagination, local mutation for optimistic UI, smart error retry, and comprehensive TypeScript support. Its predictable release cadence, with frequent minor updates and patches, ensures ongoing stability and feature enhancements. Key differentiators include its simplicity with a single `useSWR` hook, strong focus on performance and developer experience, and broad support for modern React features like Suspense.","language":"javascript","status":"active","version":"2.4.1","tags":["javascript","swr","react","hooks","request","cache","fetch","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install swr","imports":["import useSWR from 'swr'","import { SWRConfig } from 'swr'","import { useSWRImmutable } from 'swr'","import type { Key } from 'swr'"]},{"cmd":"yarn add swr","imports":[]},{"cmd":"pnpm add swr","imports":[]}],"homepage":"https://swr.vercel.app","github":"https://github.com/vercel/swr","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/swr","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/swr/compatibility"}}