Ross ROSS = Recommend OSS · open-source software intelligence for agents

vercel/swr

React Hooks for Data Fetching observed · 2026-08-28

github.com/vercel/swr · homepage · TypeScript · MIT (permissive) observed · 2026-08-28

Health v2 · maintenance only

94/100

  • Activity 99
  • Release rhythm 85
  • Longevity 100
How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: 37
  • age_days: 2501
  • days_rel: 21
  • days_push: 10
  • n_releases_24m: 14

Full methodology

Adoption not part of the score

32473 stars · 1382 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded

SWR is a React Hooks library for data fetching, named after the stale-while-revalidate caching strategy. It returns cached data first, then revalidates in the background, providing built-in caching, request deduplication, revalidation on focus/reconnect, polling, pagination, optimistic UI, and React Suspense support.

Use cases

  • fetch data in react components with a single hook
  • cache and deduplicate api requests in a react app
  • revalidate data when the window regains focus
  • implement optimistic ui updates with local mutation
  • add polling and real-time-ish data refresh to a dashboard
  • share one request across many components
  • handle pagination and scroll position recovery
  • server-side render data fetching with nextjs

When to choose

  • you're building a React or React Native app that consumes REST or any async data source
  • you want lightweight data fetching with automatic caching and revalidation
  • you use Next.js and want SSR/SSG-friendly client data fetching
  • you prefer a minimal hook-based API over heavier query libraries

When to avoid

  • your app doesn't use React (SWR hooks are React-specific)
  • you need complex normalized caching or GraphQL fragments - consider Apollo or similar
  • you need server-side state management rather than client data fetching
  • you're on Vue, Svelte, or Angular - use TanStack Query or framework-native options instead

Facets

library · maturity stable

http-client caching state-management web-framework web-development frontend apis cross-platform react react-hooks data-fetching stale-while-revalidate suspense react-native nextjs typescript vercel swr nodejs web-server

10 sources

Member repositories

RepositoryRoleHealth v2
vercel/swrmain94

For agents

markdown · JSON · MCP: product_card(name="vercel/swr")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem