SWR
Some data may be outdated — see provenance labels.
React Hooks for Data Fetching observed · 2026-10-02
Health v2 · maintenance only
90/100
- Activity 96
- Release rhythm 78
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 37
- age_days: 2549
- days_rel: 69
- days_push: 28
- n_releases_24m: 14
Adoption not part of the score
32493 stars · 1384 forks observed · 2026-10-02
What it is AI-extracted, prompt v1, taxonomy v1, 2026-10-05, confidence 0.99
SWR is a lightweight React Hooks library for data fetching that implements the stale‑while‑revalidate caching strategy. It provides built‑in cache, request deduplication, revalidation, and optimistic UI updates.
Use cases
- fetch data in a React component with automatic caching and revalidation
- share API responses across multiple components without duplicate requests
- implement optimistic UI updates for a better user experience
- handle real‑time data updates with polling or focus‑based revalidation
- integrate data fetching in server‑side rendering or static site generation
When to choose
- You need a simple, hook‑based API for data fetching in React
- You want built‑in caching, deduplication, and revalidation out of the box
- Your project uses TypeScript and you prefer a lightweight solution
- You need support for React Suspense and React Native
When to avoid
- You require a full‑featured state management library beyond data fetching
- Your application is not built with React
- You need fine‑grained control over low‑level HTTP requests that SWR abstracts away
Facets
library · maturity active
http-client caching state-management web-development frontend browser react-hooks stale-while-revalidate data-fetching typescript nodejs
10 sources
- readme: https://github.com/vercel/swr · fetched 2026-10-02 · a92586b36c6a
- homepage: https://swr.vercel.app · fetched 2026-09-21 · 4176b46b157f
- site_page: https://vercel.com/docs/frameworks/backend/nitro · fetched 2026-09-21 · f304c099ad65
- site_page: https://vercel.com/docs/frameworks/full-stack/tanstack-start · fetched 2026-09-21 · bc69508270b6
- site_page: https://vercel.com/docs/frameworks/full-stack/nuxt · fetched 2026-09-21 · 7c330d1026ec
- site_page: https://vercel.com/docs/frameworks/full-stack/sveltekit · fetched 2026-09-21 · d899ed12bad0
- site_page: https://vercel.com/docs · fetched 2026-09-21 · 699332dfcc38
- site_page: https://vercel.com/about · fetched 2026-09-21 · c78127d6b6a3
- site_page: https://vercel.com/pricing · fetched 2026-09-21 · 594b54a918ea
- site_page: https://vercel.com/changelog · fetched 2026-09-21 · 975e3e6238f8
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| vercel/swr | main | 90 |
| vercel/swr-site | docs | 75 |
For agents
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem