Kong/swrv
Stale-while-revalidate data fetching for Vue observed · 2026-10-19
Health v2 · maintenance only
86/100
- Activity 98
- Release rhythm 63
- 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: 301.0
- age_days: 2460
- days_rel: 34
- days_push: 12
- n_releases_24m: 3
Adoption not part of the score
2278 stars · 76 forks observed · 2026-10-19
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
swrv is a Vue Composition API library for remote data fetching using the stale-while-revalidate caching strategy. It serves cached data immediately, revalidates in the background, and provides features like polling, revalidation on focus, request deduplication, and error retry.
Use cases
- fetch remote data in Vue components with automatic caching
- show stale data instantly while revalidating in the background
- poll an API at intervals to keep the UI up to date
- deduplicate duplicate in-flight requests across components
- refetch data when the window regains focus
- retry failed requests with stale-if-error fallback
- plug in a custom cache like localStorage
When to avoid
- you need SSR support, which was removed as of version 0.10.0
- your project uses React (use the swr library instead)
- you need a full state management solution rather than a data-fetching hook
- you're on Vue 2.6 or below and can't use an older release
Facets
library · maturity active
http-client caching state-management middleware frontend web-development developer-tools browser cross-platform vue swr stale-while-revalidate data-fetching composition-api typescript reactivity nodejs
3 sources
- readme: https://github.com/Kong/swrv · fetched 2026-10-19 · e67bbca6d93f
- homepage: https://docs-swrv.netlify.app · fetched 2026-08-29 · 71bd4f9a908b
- registry_npm: https://registry.npmjs.org/swrv · fetched 2026-08-29 · dd62e57ba722
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| Kong/swrv | main | 86 |
For agents
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem