vercel

swr-site

The official website for SWR.

by vercel

MDX

MDX84.6%
TypeScript15%
CSS0.3%
JavaScript0%

Commit activity

Last 12 weeks · 10 commits

Full graph →

Community health

3 of 6 standards met

Community profile →
75
✓README✓License○Contributing○Code of Conduct○Issue Template✓PR Template
voidstackloop

Description [x] Updating existing documentation Document that the functional form of receives the last displayed data as its second argument, with a short example. This mirrors the behavior added in https://github.com/vercel/swr/pull/2668, where using the displayed data keeps the UI consistent with the user's actions when several mutations are in flight before any of them resolves. The new code example is mirrored to the other language pages (English text), as the contribution guide requests for code examples. Closes #510

voidstackloop · 1mo ago
huozhi

Description Replace the CodeSandbox embeds for six browser examples with editable Devjar playgrounds across all eight locales. Readers can select files from Sugar High’s FileTree, edit code with sugar-high syntax highlighting, line numbers, and light/dark themes, see the live preview and its loading status, and reset each example. Remove the external Next.js SSR example across all eight locales. Uses , , and with . The file tree is hidden by default and toggled by a folder icon. When open, it sits above the full-width editor on mobile. Rows and the header are compact, with a borderless reset icon and narrow mobile gutters. Hover and selection style only the text. The shared playground covers basic fetching, error handling, authentication, infinite loading, optimistic UI, and subscriptions. Basic Usage simulates a changing stock count and keeps the previous value visible while refreshing. All six examples share minimal monochrome styles and aligned spacing. Examples requiring a backend use simulated services. Devjar handles compiler assets and dependency resolution without package patches, copied public assets, or isolation headers. [ ] Adding new page [x] Updating existing documentation [x] Other updates Validation Production build passed, including TypeScript and generation of all 663 static pages. Chromium interaction checks passed for all six examples: live editing/reset, error recovery, login/logout, pagination, optimistic rollback, and subscription cleanup. Verified highlighted JSX/CSS, file tree navigation, edit preservation, reset, light/dark token colors, and mobile layout in development and production. Checked a translated page and confirmed compiler assets load from Next.js-generated static assets without or cross-origin isolation. Verified FileTree folder expansion and keyboard selection, mobile editing, synchronized scrolling, and a single horizontal scrollbar. Verified visible stock changes and stale data during refresh, shared styles at 320px, and all six example interactions.

huozhi · 1mo ago
Structured data for AI agents

Repository: vercel/swr-site. Description: The official website for SWR. Stars: 511, Forks: 361. Primary language: MDX. Languages: MDX (84.6%), TypeScript (15%), CSS (0.3%), JavaScript (0%). License: Apache-2.0. Homepage: https://swr.vercel.app Open PRs: 42, open issues: 80. Last activity: 1h ago. Community health: 75%. Top contributors: shuding, huozhi, koba04, huzhengen, pacocoursey, vassbence, dependabot[bot], valentinpolitov, leodr, guilherssousa and others.