Skip to content

Skill#4220

Open
haydenbleasel wants to merge 1 commit intomainfrom
skill
Open

Skill#4220
haydenbleasel wants to merge 1 commit intomainfrom
skill

Conversation

@haydenbleasel
Copy link
Member

This pull request adds comprehensive documentation for the SWR (stale-while-revalidate) React data fetching library, including an overview, API reference, troubleshooting guide, and migration notes. The documentation is organized to help developers quickly understand core usage, configuration, advanced patterns, and common issues when working with SWR.

New Documentation Added:

General Overview and Quick Reference:

  • Introduced a new SKILL.md providing a summary of SWR, quick usage examples for all major hooks (useSWR, useSWRMutation, useSWRInfinite, useSWRSubscription, useSWRImmutable), key concepts, and links to further references.

API Reference:

  • Added references/api.md detailing all SWR hooks, configuration options, mutation/infinite loading settings, key and response types, cache API, and utility functions like mutate, preload, and unstable_serialize.

Troubleshooting and Migration:

  • Added references/troubleshooting.md with solutions for common issues (unexpected revalidation, stale data, SSR/TypeScript/performance issues, infinite loops) and a migration guide from SWR v1 to v2, highlighting key API changes and usage patterns.

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@molebox
Copy link

molebox commented Mar 4, 2026

@shuding are we good to merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants