swr
Installation
SKILL.md
SWR
Reference for SWR v2, the React Hooks library for stale-while-revalidate data fetching. Prefer the project's existing data layer, fetchers, and hook conventions; apply these rules on top so cache identity, revalidation, and mutation behavior stay predictable.
Branch-specific references, loaded on demand:
- pagination.md —
useSWRInfinitefor paginated and cursor-based lists. - subscriptions.md —
useSWRSubscriptionfor WebSocket and realtime sources. - nextjs.md — App Router boundaries, server prefetch, and
fallbackhydration.