[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openai-swr":3,"mdc--qhcx7q-key":38,"related-repo-openai-swr":3542,"related-org-openai-swr":3660},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":27,"repoUrl":28,"updatedAt":29,"license":30,"forks":31,"topics":32,"repo":33,"sourceUrl":36,"mdContent":37},"swr","fetch and cache data with SWR","SWR data-fetching expert guidance. Use when building React apps with client-side data fetching, caching, revalidation, mutations, optimistic UI, pagination, or infinite loading using the SWR library.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"openai","OpenAI","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fopenai.png",[12,16,19,22,25],{"name":13,"slug":14,"type":15},"Performance","performance","tag",{"name":17,"slug":18,"type":15},"React","react",{"name":20,"slug":21,"type":15},"Caching","caching",{"name":23,"slug":24,"type":15},"Frontend","frontend",{"name":26,"slug":4,"type":15},"SWR",3992,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins","2026-04-06T18:40:19.941705",null,465,[],{"repoUrl":28,"stars":27,"forks":31,"topics":34,"description":35},[],"OpenAI Plugins","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Ftree\u002FHEAD\u002Fplugins\u002Fvercel\u002Fskills\u002Fswr","---\nname: swr\ndescription: SWR data-fetching expert guidance. Use when building React apps with client-side data fetching, caching, revalidation, mutations, optimistic UI, pagination, or infinite loading using the SWR library.\nmetadata:\n  priority: 4\n  docs:\n    - \"https:\u002F\u002Fswr.vercel.app\u002Fdocs\"\n  sitemap: \"https:\u002F\u002Fswr.vercel.app\u002Fsitemap.xml\"\n  pathPatterns:\n    - 'lib\u002Ffetcher.*'\n    - 'src\u002Flib\u002Ffetcher.*'\n    - 'utils\u002Ffetcher.*'\n    - 'src\u002Futils\u002Ffetcher.*'\n    - 'hooks\u002Fuse*SWR*'\n    - 'src\u002Fhooks\u002Fuse*SWR*'\n    - 'hooks\u002FuseFetch*'\n    - 'src\u002Fhooks\u002FuseFetch*'\n  importPatterns:\n    - 'swr'\n    - 'swr\u002F*'\n  bashPatterns:\n    - '\\bnpm\\s+(install|i|add)\\s+[^\\n]*\\bswr\\b'\n    - '\\bpnpm\\s+(install|i|add)\\s+[^\\n]*\\bswr\\b'\n    - '\\bbun\\s+(install|i|add)\\s+[^\\n]*\\bswr\\b'\n    - '\\byarn\\s+add\\s+[^\\n]*\\bswr\\b'\n  promptSignals:\n    phrases:\n      - \"swr\"\n      - \"useswr\"\n      - \"stale-while-revalidate\"\n    allOf:\n      - [data fetching, client]\n      - [cache, revalidat]\n    anyOf:\n      - \"mutation\"\n      - \"optimistic\"\n      - \"infinite loading\"\n      - \"pagination\"\n    noneOf: []\n    minScore: 6\n---\n\n# SWR — React Hooks for Data Fetching\n\nYou are an expert in SWR v2 (latest: 2.4.1), the React Hooks library for data fetching by Vercel. SWR implements the stale-while-revalidate HTTP cache invalidation strategy — serve from cache first, then revalidate in the background.\n\n## Installation\n\n```bash\nnpm install swr\n```\n\n## Core API\n\n### `useSWR`\n\n```tsx\nimport useSWR from 'swr'\n\nconst fetcher = (url: string) => fetch(url).then(res => res.json())\n\nfunction Profile() {\n  const { data, error, isLoading, mutate } = useSWR('\u002Fapi\u002Fuser', fetcher)\n\n  if (isLoading) return \u003Cdiv>Loading...\u003C\u002Fdiv>\n  if (error) return \u003Cdiv>Error loading data\u003C\u002Fdiv>\n  return \u003Cdiv>Hello, {data.name}\u003C\u002Fdiv>\n}\n```\n\n**Key parameters:**\n- `key` — unique string, array, or function identifying the resource (often a URL)\n- `fetcher` — async function that receives the key and returns data\n- `options` — optional config object\n\n**Return values:** `data`, `error`, `isLoading`, `isValidating`, `mutate`\n\n### `useSWRMutation` — Remote Mutations\n\n```tsx\nimport useSWRMutation from 'swr\u002Fmutation'\n\nasync function updateUser(url: string, { arg }: { arg: { name: string } }) {\n  return fetch(url, { method: 'POST', body: JSON.stringify(arg) }).then(res => res.json())\n}\n\nfunction Profile() {\n  const { trigger, isMutating } = useSWRMutation('\u002Fapi\u002Fuser', updateUser)\n\n  return (\n    \u003Cbutton disabled={isMutating} onClick={() => trigger({ name: 'New Name' })}>\n      Update\n    \u003C\u002Fbutton>\n  )\n}\n```\n\n### `useSWRInfinite` — Pagination & Infinite Loading\n\n```tsx\nimport useSWRInfinite from 'swr\u002Finfinite'\n\nconst getKey = (pageIndex: number, previousPageData: any[]) => {\n  if (previousPageData && !previousPageData.length) return null\n  return `\u002Fapi\u002Fitems?page=${pageIndex}`\n}\n\nfunction Items() {\n  const { data, size, setSize, isLoading } = useSWRInfinite(getKey, fetcher)\n  const items = data ? data.flat() : []\n\n  return (\n    \u003C>\n      {items.map(item => \u003Cdiv key={item.id}>{item.name}\u003C\u002Fdiv>)}\n      \u003Cbutton onClick={() => setSize(size + 1)}>Load More\u003C\u002Fbutton>\n    \u003C\u002F>\n  )\n}\n```\n\n## Global Configuration\n\nWrap your app (or a subtree) with `SWRConfig` to set defaults:\n\n```tsx\nimport { SWRConfig } from 'swr'\n\nfunction App() {\n  return (\n    \u003CSWRConfig value={{\n      fetcher: (url: string) => fetch(url).then(res => res.json()),\n      revalidateOnFocus: false,\n      dedupingInterval: 5000,\n    }}>\n      \u003CDashboard \u002F>\n    \u003C\u002FSWRConfig>\n  )\n}\n```\n\n## Revalidation Strategies\n\n| Strategy | Option | Default |\n|---|---|---|\n| On window focus | `revalidateOnFocus` | `true` |\n| On network recovery | `revalidateOnReconnect` | `true` |\n| On mount if stale | `revalidateIfStale` | `true` |\n| Polling | `refreshInterval` | `0` (disabled) |\n| Manual | Call `mutate()` | — |\n\n## Optimistic Updates\n\n```tsx\nconst { trigger } = useSWRMutation('\u002Fapi\u002Fuser', updateUser, {\n  optimisticData: (current) => ({ ...current, name: 'New Name' }),\n  rollbackOnError: true,\n  populateCache: true,\n  revalidate: false,\n})\n```\n\n## Conditional Fetching\n\nPass `null` or a falsy key to skip fetching:\n\n```tsx\nconst { data } = useSWR(userId ? `\u002Fapi\u002Fuser\u002F${userId}` : null, fetcher)\n```\n\n## Error Retry\n\nSWR retries on error by default with exponential backoff. Customize with:\n\n```tsx\nuseSWR(key, fetcher, {\n  onErrorRetry: (error, key, config, revalidate, { retryCount }) => {\n    if (error.status === 404) return \u002F\u002F Don't retry on 404\n    if (retryCount >= 3) return      \u002F\u002F Max 3 retries\n    setTimeout(() => revalidate({ retryCount }), 5000)\n  },\n})\n```\n\n## `useSWRSubscription` — Real-Time Data Sources\n\nSubscribe to real-time data (WebSockets, SSE, etc.) with automatic deduplication:\n\n```tsx\nimport useSWRSubscription from 'swr\u002Fsubscription'\n\nfunction LivePrice({ symbol }: { symbol: string }) {\n  const { data } = useSWRSubscription(\n    `wss:\u002F\u002Fstream.example.com\u002F${symbol}`,\n    (key, { next }) => {\n      const ws = new WebSocket(key)\n      ws.onmessage = (event) => next(null, JSON.parse(event.data))\n      ws.onerror = (event) => next(event)\n      return () => ws.close()\n    }\n  )\n\n  return \u003Cspan>{data?.price}\u003C\u002Fspan>\n}\n```\n\nThe `subscribe` function receives a `next(error, data)` callback and must return a cleanup function. Multiple components using the same key share a single subscription.\n\n## Key Rules\n\n- **Keys must be unique** — two `useSWR` calls with the same key share cache and deduplicate requests\n- **Fetcher is optional** when set via `SWRConfig`\n- **`mutate(key)`** globally revalidates any hook matching that key\n- **Array keys** like `useSWR(['\u002Fapi\u002Fuser', id], fetcher)` — the fetcher receives the full array\n- **Never call hooks conditionally** — use conditional keys (`null`) instead\n",{"data":39,"body":79},{"name":4,"description":6,"metadata":40},{"priority":41,"docs":42,"sitemap":44,"pathPatterns":45,"importPatterns":54,"bashPatterns":56,"promptSignals":61},4,[43],"https:\u002F\u002Fswr.vercel.app\u002Fdocs","https:\u002F\u002Fswr.vercel.app\u002Fsitemap.xml",[46,47,48,49,50,51,52,53],"lib\u002Ffetcher.*","src\u002Flib\u002Ffetcher.*","utils\u002Ffetcher.*","src\u002Futils\u002Ffetcher.*","hooks\u002Fuse*SWR*","src\u002Fhooks\u002Fuse*SWR*","hooks\u002FuseFetch*","src\u002Fhooks\u002FuseFetch*",[4,55],"swr\u002F*",[57,58,59,60],"\\bnpm\\s+(install|i|add)\\s+[^\\n]*\\bswr\\b","\\bpnpm\\s+(install|i|add)\\s+[^\\n]*\\bswr\\b","\\bbun\\s+(install|i|add)\\s+[^\\n]*\\bswr\\b","\\byarn\\s+add\\s+[^\\n]*\\bswr\\b",{"phrases":62,"allOf":65,"anyOf":72,"noneOf":77,"minScore":78},[4,63,64],"useswr","stale-while-revalidate",[66,69],[67,68],"data fetching","client",[70,71],"cache","revalidat",[73,74,75,76],"mutation","optimistic","infinite loading","pagination",[],6,{"type":80,"children":81},"root",[82,91,97,104,139,145,155,630,639,677,719,731,1256,1268,1848,1854,1867,2153,2159,2320,2326,2547,2553,2566,2649,2655,2660,2929,2941,2946,3425,3446,3452,3536],{"type":83,"tag":84,"props":85,"children":87},"element","h1",{"id":86},"swr-react-hooks-for-data-fetching",[88],{"type":89,"value":90},"text","SWR — React Hooks for Data Fetching",{"type":83,"tag":92,"props":93,"children":94},"p",{},[95],{"type":89,"value":96},"You are an expert in SWR v2 (latest: 2.4.1), the React Hooks library for data fetching by Vercel. SWR implements the stale-while-revalidate HTTP cache invalidation strategy — serve from cache first, then revalidate in the background.",{"type":83,"tag":98,"props":99,"children":101},"h2",{"id":100},"installation",[102],{"type":89,"value":103},"Installation",{"type":83,"tag":105,"props":106,"children":111},"pre",{"className":107,"code":108,"language":109,"meta":110,"style":110},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install swr\n","bash","",[112],{"type":83,"tag":113,"props":114,"children":115},"code",{"__ignoreMap":110},[116],{"type":83,"tag":117,"props":118,"children":121},"span",{"class":119,"line":120},"line",1,[122,128,134],{"type":83,"tag":117,"props":123,"children":125},{"style":124},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[126],{"type":89,"value":127},"npm",{"type":83,"tag":117,"props":129,"children":131},{"style":130},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[132],{"type":89,"value":133}," install",{"type":83,"tag":117,"props":135,"children":136},{"style":130},[137],{"type":89,"value":138}," swr\n",{"type":83,"tag":98,"props":140,"children":142},{"id":141},"core-api",[143],{"type":89,"value":144},"Core API",{"type":83,"tag":146,"props":147,"children":148},"h3",{"id":63},[149],{"type":83,"tag":113,"props":150,"children":152},{"className":151},[],[153],{"type":89,"value":154},"useSWR",{"type":83,"tag":105,"props":156,"children":160},{"className":157,"code":158,"language":159,"meta":110,"style":110},"language-tsx shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import useSWR from 'swr'\n\nconst fetcher = (url: string) => fetch(url).then(res => res.json())\n\nfunction Profile() {\n  const { data, error, isLoading, mutate } = useSWR('\u002Fapi\u002Fuser', fetcher)\n\n  if (isLoading) return \u003Cdiv>Loading...\u003C\u002Fdiv>\n  if (error) return \u003Cdiv>Error loading data\u003C\u002Fdiv>\n  return \u003Cdiv>Hello, {data.name}\u003C\u002Fdiv>\n}\n","tsx",[161],{"type":83,"tag":113,"props":162,"children":163},{"__ignoreMap":110},[164,199,209,314,321,345,439,447,509,563,621],{"type":83,"tag":117,"props":165,"children":166},{"class":119,"line":120},[167,173,179,184,190,194],{"type":83,"tag":117,"props":168,"children":170},{"style":169},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[171],{"type":89,"value":172},"import",{"type":83,"tag":117,"props":174,"children":176},{"style":175},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[177],{"type":89,"value":178}," useSWR ",{"type":83,"tag":117,"props":180,"children":181},{"style":169},[182],{"type":89,"value":183},"from",{"type":83,"tag":117,"props":185,"children":187},{"style":186},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[188],{"type":89,"value":189}," '",{"type":83,"tag":117,"props":191,"children":192},{"style":130},[193],{"type":89,"value":4},{"type":83,"tag":117,"props":195,"children":196},{"style":186},[197],{"type":89,"value":198},"'\n",{"type":83,"tag":117,"props":200,"children":202},{"class":119,"line":201},2,[203],{"type":83,"tag":117,"props":204,"children":206},{"emptyLinePlaceholder":205},true,[207],{"type":89,"value":208},"\n",{"type":83,"tag":117,"props":210,"children":212},{"class":119,"line":211},3,[213,219,224,229,234,240,245,250,255,260,266,271,276,281,286,291,295,300,304,309],{"type":83,"tag":117,"props":214,"children":216},{"style":215},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[217],{"type":89,"value":218},"const",{"type":83,"tag":117,"props":220,"children":221},{"style":175},[222],{"type":89,"value":223}," fetcher ",{"type":83,"tag":117,"props":225,"children":226},{"style":186},[227],{"type":89,"value":228},"=",{"type":83,"tag":117,"props":230,"children":231},{"style":186},[232],{"type":89,"value":233}," (",{"type":83,"tag":117,"props":235,"children":237},{"style":236},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[238],{"type":89,"value":239},"url",{"type":83,"tag":117,"props":241,"children":242},{"style":186},[243],{"type":89,"value":244},":",{"type":83,"tag":117,"props":246,"children":247},{"style":124},[248],{"type":89,"value":249}," string",{"type":83,"tag":117,"props":251,"children":252},{"style":186},[253],{"type":89,"value":254},")",{"type":83,"tag":117,"props":256,"children":257},{"style":215},[258],{"type":89,"value":259}," =>",{"type":83,"tag":117,"props":261,"children":263},{"style":262},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[264],{"type":89,"value":265}," fetch",{"type":83,"tag":117,"props":267,"children":268},{"style":175},[269],{"type":89,"value":270},"(url)",{"type":83,"tag":117,"props":272,"children":273},{"style":186},[274],{"type":89,"value":275},".",{"type":83,"tag":117,"props":277,"children":278},{"style":262},[279],{"type":89,"value":280},"then",{"type":83,"tag":117,"props":282,"children":283},{"style":175},[284],{"type":89,"value":285},"(",{"type":83,"tag":117,"props":287,"children":288},{"style":236},[289],{"type":89,"value":290},"res",{"type":83,"tag":117,"props":292,"children":293},{"style":215},[294],{"type":89,"value":259},{"type":83,"tag":117,"props":296,"children":297},{"style":175},[298],{"type":89,"value":299}," res",{"type":83,"tag":117,"props":301,"children":302},{"style":186},[303],{"type":89,"value":275},{"type":83,"tag":117,"props":305,"children":306},{"style":262},[307],{"type":89,"value":308},"json",{"type":83,"tag":117,"props":310,"children":311},{"style":175},[312],{"type":89,"value":313},"())\n",{"type":83,"tag":117,"props":315,"children":316},{"class":119,"line":41},[317],{"type":83,"tag":117,"props":318,"children":319},{"emptyLinePlaceholder":205},[320],{"type":89,"value":208},{"type":83,"tag":117,"props":322,"children":324},{"class":119,"line":323},5,[325,330,335,340],{"type":83,"tag":117,"props":326,"children":327},{"style":215},[328],{"type":89,"value":329},"function",{"type":83,"tag":117,"props":331,"children":332},{"style":262},[333],{"type":89,"value":334}," Profile",{"type":83,"tag":117,"props":336,"children":337},{"style":186},[338],{"type":89,"value":339},"()",{"type":83,"tag":117,"props":341,"children":342},{"style":186},[343],{"type":89,"value":344}," {\n",{"type":83,"tag":117,"props":346,"children":347},{"class":119,"line":78},[348,353,358,363,368,373,377,382,386,391,396,401,406,411,416,421,425,429,434],{"type":83,"tag":117,"props":349,"children":350},{"style":215},[351],{"type":89,"value":352},"  const",{"type":83,"tag":117,"props":354,"children":355},{"style":186},[356],{"type":89,"value":357}," {",{"type":83,"tag":117,"props":359,"children":360},{"style":175},[361],{"type":89,"value":362}," data",{"type":83,"tag":117,"props":364,"children":365},{"style":186},[366],{"type":89,"value":367},",",{"type":83,"tag":117,"props":369,"children":370},{"style":175},[371],{"type":89,"value":372}," error",{"type":83,"tag":117,"props":374,"children":375},{"style":186},[376],{"type":89,"value":367},{"type":83,"tag":117,"props":378,"children":379},{"style":175},[380],{"type":89,"value":381}," isLoading",{"type":83,"tag":117,"props":383,"children":384},{"style":186},[385],{"type":89,"value":367},{"type":83,"tag":117,"props":387,"children":388},{"style":175},[389],{"type":89,"value":390}," mutate",{"type":83,"tag":117,"props":392,"children":393},{"style":186},[394],{"type":89,"value":395}," }",{"type":83,"tag":117,"props":397,"children":398},{"style":186},[399],{"type":89,"value":400}," =",{"type":83,"tag":117,"props":402,"children":403},{"style":262},[404],{"type":89,"value":405}," useSWR",{"type":83,"tag":117,"props":407,"children":409},{"style":408},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[410],{"type":89,"value":285},{"type":83,"tag":117,"props":412,"children":413},{"style":186},[414],{"type":89,"value":415},"'",{"type":83,"tag":117,"props":417,"children":418},{"style":130},[419],{"type":89,"value":420},"\u002Fapi\u002Fuser",{"type":83,"tag":117,"props":422,"children":423},{"style":186},[424],{"type":89,"value":415},{"type":83,"tag":117,"props":426,"children":427},{"style":186},[428],{"type":89,"value":367},{"type":83,"tag":117,"props":430,"children":431},{"style":175},[432],{"type":89,"value":433}," fetcher",{"type":83,"tag":117,"props":435,"children":436},{"style":408},[437],{"type":89,"value":438},")\n",{"type":83,"tag":117,"props":440,"children":442},{"class":119,"line":441},7,[443],{"type":83,"tag":117,"props":444,"children":445},{"emptyLinePlaceholder":205},[446],{"type":89,"value":208},{"type":83,"tag":117,"props":448,"children":450},{"class":119,"line":449},8,[451,456,460,465,470,475,480,485,490,495,500,504],{"type":83,"tag":117,"props":452,"children":453},{"style":169},[454],{"type":89,"value":455},"  if",{"type":83,"tag":117,"props":457,"children":458},{"style":408},[459],{"type":89,"value":233},{"type":83,"tag":117,"props":461,"children":462},{"style":175},[463],{"type":89,"value":464},"isLoading",{"type":83,"tag":117,"props":466,"children":467},{"style":408},[468],{"type":89,"value":469},") ",{"type":83,"tag":117,"props":471,"children":472},{"style":169},[473],{"type":89,"value":474},"return",{"type":83,"tag":117,"props":476,"children":477},{"style":186},[478],{"type":89,"value":479}," \u003C",{"type":83,"tag":117,"props":481,"children":482},{"style":408},[483],{"type":89,"value":484},"div",{"type":83,"tag":117,"props":486,"children":487},{"style":186},[488],{"type":89,"value":489},">",{"type":83,"tag":117,"props":491,"children":492},{"style":175},[493],{"type":89,"value":494},"Loading...",{"type":83,"tag":117,"props":496,"children":497},{"style":186},[498],{"type":89,"value":499},"\u003C\u002F",{"type":83,"tag":117,"props":501,"children":502},{"style":408},[503],{"type":89,"value":484},{"type":83,"tag":117,"props":505,"children":506},{"style":186},[507],{"type":89,"value":508},">\n",{"type":83,"tag":117,"props":510,"children":512},{"class":119,"line":511},9,[513,517,521,526,530,534,538,542,546,551,555,559],{"type":83,"tag":117,"props":514,"children":515},{"style":169},[516],{"type":89,"value":455},{"type":83,"tag":117,"props":518,"children":519},{"style":408},[520],{"type":89,"value":233},{"type":83,"tag":117,"props":522,"children":523},{"style":175},[524],{"type":89,"value":525},"error",{"type":83,"tag":117,"props":527,"children":528},{"style":408},[529],{"type":89,"value":469},{"type":83,"tag":117,"props":531,"children":532},{"style":169},[533],{"type":89,"value":474},{"type":83,"tag":117,"props":535,"children":536},{"style":186},[537],{"type":89,"value":479},{"type":83,"tag":117,"props":539,"children":540},{"style":408},[541],{"type":89,"value":484},{"type":83,"tag":117,"props":543,"children":544},{"style":186},[545],{"type":89,"value":489},{"type":83,"tag":117,"props":547,"children":548},{"style":175},[549],{"type":89,"value":550},"Error loading data",{"type":83,"tag":117,"props":552,"children":553},{"style":186},[554],{"type":89,"value":499},{"type":83,"tag":117,"props":556,"children":557},{"style":408},[558],{"type":89,"value":484},{"type":83,"tag":117,"props":560,"children":561},{"style":186},[562],{"type":89,"value":508},{"type":83,"tag":117,"props":564,"children":566},{"class":119,"line":565},10,[567,572,576,580,584,589,594,599,603,608,613,617],{"type":83,"tag":117,"props":568,"children":569},{"style":169},[570],{"type":89,"value":571},"  return",{"type":83,"tag":117,"props":573,"children":574},{"style":186},[575],{"type":89,"value":479},{"type":83,"tag":117,"props":577,"children":578},{"style":408},[579],{"type":89,"value":484},{"type":83,"tag":117,"props":581,"children":582},{"style":186},[583],{"type":89,"value":489},{"type":83,"tag":117,"props":585,"children":586},{"style":175},[587],{"type":89,"value":588},"Hello, ",{"type":83,"tag":117,"props":590,"children":591},{"style":186},[592],{"type":89,"value":593},"{",{"type":83,"tag":117,"props":595,"children":596},{"style":175},[597],{"type":89,"value":598},"data",{"type":83,"tag":117,"props":600,"children":601},{"style":186},[602],{"type":89,"value":275},{"type":83,"tag":117,"props":604,"children":605},{"style":175},[606],{"type":89,"value":607},"name",{"type":83,"tag":117,"props":609,"children":610},{"style":186},[611],{"type":89,"value":612},"}\u003C\u002F",{"type":83,"tag":117,"props":614,"children":615},{"style":408},[616],{"type":89,"value":484},{"type":83,"tag":117,"props":618,"children":619},{"style":186},[620],{"type":89,"value":508},{"type":83,"tag":117,"props":622,"children":624},{"class":119,"line":623},11,[625],{"type":83,"tag":117,"props":626,"children":627},{"style":186},[628],{"type":89,"value":629},"}\n",{"type":83,"tag":92,"props":631,"children":632},{},[633],{"type":83,"tag":634,"props":635,"children":636},"strong",{},[637],{"type":89,"value":638},"Key parameters:",{"type":83,"tag":640,"props":641,"children":642},"ul",{},[643,655,666],{"type":83,"tag":644,"props":645,"children":646},"li",{},[647,653],{"type":83,"tag":113,"props":648,"children":650},{"className":649},[],[651],{"type":89,"value":652},"key",{"type":89,"value":654}," — unique string, array, or function identifying the resource (often a URL)",{"type":83,"tag":644,"props":656,"children":657},{},[658,664],{"type":83,"tag":113,"props":659,"children":661},{"className":660},[],[662],{"type":89,"value":663},"fetcher",{"type":89,"value":665}," — async function that receives the key and returns data",{"type":83,"tag":644,"props":667,"children":668},{},[669,675],{"type":83,"tag":113,"props":670,"children":672},{"className":671},[],[673],{"type":89,"value":674},"options",{"type":89,"value":676}," — optional config object",{"type":83,"tag":92,"props":678,"children":679},{},[680,685,687,692,694,699,700,705,706,712,713],{"type":83,"tag":634,"props":681,"children":682},{},[683],{"type":89,"value":684},"Return values:",{"type":89,"value":686}," ",{"type":83,"tag":113,"props":688,"children":690},{"className":689},[],[691],{"type":89,"value":598},{"type":89,"value":693},", ",{"type":83,"tag":113,"props":695,"children":697},{"className":696},[],[698],{"type":89,"value":525},{"type":89,"value":693},{"type":83,"tag":113,"props":701,"children":703},{"className":702},[],[704],{"type":89,"value":464},{"type":89,"value":693},{"type":83,"tag":113,"props":707,"children":709},{"className":708},[],[710],{"type":89,"value":711},"isValidating",{"type":89,"value":693},{"type":83,"tag":113,"props":714,"children":716},{"className":715},[],[717],{"type":89,"value":718},"mutate",{"type":83,"tag":146,"props":720,"children":722},{"id":721},"useswrmutation-remote-mutations",[723,729],{"type":83,"tag":113,"props":724,"children":726},{"className":725},[],[727],{"type":89,"value":728},"useSWRMutation",{"type":89,"value":730}," — Remote Mutations",{"type":83,"tag":105,"props":732,"children":734},{"className":157,"code":733,"language":159,"meta":110,"style":110},"import useSWRMutation from 'swr\u002Fmutation'\n\nasync function updateUser(url: string, { arg }: { arg: { name: string } }) {\n  return fetch(url, { method: 'POST', body: JSON.stringify(arg) }).then(res => res.json())\n}\n\nfunction Profile() {\n  const { trigger, isMutating } = useSWRMutation('\u002Fapi\u002Fuser', updateUser)\n\n  return (\n    \u003Cbutton disabled={isMutating} onClick={() => trigger({ name: 'New Name' })}>\n      Update\n    \u003C\u002Fbutton>\n  )\n}\n",[735],{"type":83,"tag":113,"props":736,"children":737},{"__ignoreMap":110},[738,767,774,868,1002,1009,1016,1035,1101,1108,1120,1213,1222,1239,1248],{"type":83,"tag":117,"props":739,"children":740},{"class":119,"line":120},[741,745,750,754,758,763],{"type":83,"tag":117,"props":742,"children":743},{"style":169},[744],{"type":89,"value":172},{"type":83,"tag":117,"props":746,"children":747},{"style":175},[748],{"type":89,"value":749}," useSWRMutation ",{"type":83,"tag":117,"props":751,"children":752},{"style":169},[753],{"type":89,"value":183},{"type":83,"tag":117,"props":755,"children":756},{"style":186},[757],{"type":89,"value":189},{"type":83,"tag":117,"props":759,"children":760},{"style":130},[761],{"type":89,"value":762},"swr\u002Fmutation",{"type":83,"tag":117,"props":764,"children":765},{"style":186},[766],{"type":89,"value":198},{"type":83,"tag":117,"props":768,"children":769},{"class":119,"line":201},[770],{"type":83,"tag":117,"props":771,"children":772},{"emptyLinePlaceholder":205},[773],{"type":89,"value":208},{"type":83,"tag":117,"props":775,"children":776},{"class":119,"line":211},[777,782,787,792,796,800,804,808,812,816,821,826,830,834,838,842,847,851,855,859,864],{"type":83,"tag":117,"props":778,"children":779},{"style":215},[780],{"type":89,"value":781},"async",{"type":83,"tag":117,"props":783,"children":784},{"style":215},[785],{"type":89,"value":786}," function",{"type":83,"tag":117,"props":788,"children":789},{"style":262},[790],{"type":89,"value":791}," updateUser",{"type":83,"tag":117,"props":793,"children":794},{"style":186},[795],{"type":89,"value":285},{"type":83,"tag":117,"props":797,"children":798},{"style":236},[799],{"type":89,"value":239},{"type":83,"tag":117,"props":801,"children":802},{"style":186},[803],{"type":89,"value":244},{"type":83,"tag":117,"props":805,"children":806},{"style":124},[807],{"type":89,"value":249},{"type":83,"tag":117,"props":809,"children":810},{"style":186},[811],{"type":89,"value":367},{"type":83,"tag":117,"props":813,"children":814},{"style":186},[815],{"type":89,"value":357},{"type":83,"tag":117,"props":817,"children":818},{"style":236},[819],{"type":89,"value":820}," arg",{"type":83,"tag":117,"props":822,"children":823},{"style":186},[824],{"type":89,"value":825}," }:",{"type":83,"tag":117,"props":827,"children":828},{"style":186},[829],{"type":89,"value":357},{"type":83,"tag":117,"props":831,"children":832},{"style":408},[833],{"type":89,"value":820},{"type":83,"tag":117,"props":835,"children":836},{"style":186},[837],{"type":89,"value":244},{"type":83,"tag":117,"props":839,"children":840},{"style":186},[841],{"type":89,"value":357},{"type":83,"tag":117,"props":843,"children":844},{"style":408},[845],{"type":89,"value":846}," name",{"type":83,"tag":117,"props":848,"children":849},{"style":186},[850],{"type":89,"value":244},{"type":83,"tag":117,"props":852,"children":853},{"style":124},[854],{"type":89,"value":249},{"type":83,"tag":117,"props":856,"children":857},{"style":186},[858],{"type":89,"value":395},{"type":83,"tag":117,"props":860,"children":861},{"style":186},[862],{"type":89,"value":863}," })",{"type":83,"tag":117,"props":865,"children":866},{"style":186},[867],{"type":89,"value":344},{"type":83,"tag":117,"props":869,"children":870},{"class":119,"line":41},[871,875,879,883,887,891,895,900,904,908,913,917,921,926,930,935,939,944,948,953,957,962,966,970,974,978,982,986,990,994,998],{"type":83,"tag":117,"props":872,"children":873},{"style":169},[874],{"type":89,"value":571},{"type":83,"tag":117,"props":876,"children":877},{"style":262},[878],{"type":89,"value":265},{"type":83,"tag":117,"props":880,"children":881},{"style":408},[882],{"type":89,"value":285},{"type":83,"tag":117,"props":884,"children":885},{"style":175},[886],{"type":89,"value":239},{"type":83,"tag":117,"props":888,"children":889},{"style":186},[890],{"type":89,"value":367},{"type":83,"tag":117,"props":892,"children":893},{"style":186},[894],{"type":89,"value":357},{"type":83,"tag":117,"props":896,"children":897},{"style":408},[898],{"type":89,"value":899}," method",{"type":83,"tag":117,"props":901,"children":902},{"style":186},[903],{"type":89,"value":244},{"type":83,"tag":117,"props":905,"children":906},{"style":186},[907],{"type":89,"value":189},{"type":83,"tag":117,"props":909,"children":910},{"style":130},[911],{"type":89,"value":912},"POST",{"type":83,"tag":117,"props":914,"children":915},{"style":186},[916],{"type":89,"value":415},{"type":83,"tag":117,"props":918,"children":919},{"style":186},[920],{"type":89,"value":367},{"type":83,"tag":117,"props":922,"children":923},{"style":408},[924],{"type":89,"value":925}," body",{"type":83,"tag":117,"props":927,"children":928},{"style":186},[929],{"type":89,"value":244},{"type":83,"tag":117,"props":931,"children":932},{"style":175},[933],{"type":89,"value":934}," JSON",{"type":83,"tag":117,"props":936,"children":937},{"style":186},[938],{"type":89,"value":275},{"type":83,"tag":117,"props":940,"children":941},{"style":262},[942],{"type":89,"value":943},"stringify",{"type":83,"tag":117,"props":945,"children":946},{"style":408},[947],{"type":89,"value":285},{"type":83,"tag":117,"props":949,"children":950},{"style":175},[951],{"type":89,"value":952},"arg",{"type":83,"tag":117,"props":954,"children":955},{"style":408},[956],{"type":89,"value":469},{"type":83,"tag":117,"props":958,"children":959},{"style":186},[960],{"type":89,"value":961},"}",{"type":83,"tag":117,"props":963,"children":964},{"style":408},[965],{"type":89,"value":254},{"type":83,"tag":117,"props":967,"children":968},{"style":186},[969],{"type":89,"value":275},{"type":83,"tag":117,"props":971,"children":972},{"style":262},[973],{"type":89,"value":280},{"type":83,"tag":117,"props":975,"children":976},{"style":408},[977],{"type":89,"value":285},{"type":83,"tag":117,"props":979,"children":980},{"style":236},[981],{"type":89,"value":290},{"type":83,"tag":117,"props":983,"children":984},{"style":215},[985],{"type":89,"value":259},{"type":83,"tag":117,"props":987,"children":988},{"style":175},[989],{"type":89,"value":299},{"type":83,"tag":117,"props":991,"children":992},{"style":186},[993],{"type":89,"value":275},{"type":83,"tag":117,"props":995,"children":996},{"style":262},[997],{"type":89,"value":308},{"type":83,"tag":117,"props":999,"children":1000},{"style":408},[1001],{"type":89,"value":313},{"type":83,"tag":117,"props":1003,"children":1004},{"class":119,"line":323},[1005],{"type":83,"tag":117,"props":1006,"children":1007},{"style":186},[1008],{"type":89,"value":629},{"type":83,"tag":117,"props":1010,"children":1011},{"class":119,"line":78},[1012],{"type":83,"tag":117,"props":1013,"children":1014},{"emptyLinePlaceholder":205},[1015],{"type":89,"value":208},{"type":83,"tag":117,"props":1017,"children":1018},{"class":119,"line":441},[1019,1023,1027,1031],{"type":83,"tag":117,"props":1020,"children":1021},{"style":215},[1022],{"type":89,"value":329},{"type":83,"tag":117,"props":1024,"children":1025},{"style":262},[1026],{"type":89,"value":334},{"type":83,"tag":117,"props":1028,"children":1029},{"style":186},[1030],{"type":89,"value":339},{"type":83,"tag":117,"props":1032,"children":1033},{"style":186},[1034],{"type":89,"value":344},{"type":83,"tag":117,"props":1036,"children":1037},{"class":119,"line":449},[1038,1042,1046,1051,1055,1060,1064,1068,1073,1077,1081,1085,1089,1093,1097],{"type":83,"tag":117,"props":1039,"children":1040},{"style":215},[1041],{"type":89,"value":352},{"type":83,"tag":117,"props":1043,"children":1044},{"style":186},[1045],{"type":89,"value":357},{"type":83,"tag":117,"props":1047,"children":1048},{"style":175},[1049],{"type":89,"value":1050}," trigger",{"type":83,"tag":117,"props":1052,"children":1053},{"style":186},[1054],{"type":89,"value":367},{"type":83,"tag":117,"props":1056,"children":1057},{"style":175},[1058],{"type":89,"value":1059}," isMutating",{"type":83,"tag":117,"props":1061,"children":1062},{"style":186},[1063],{"type":89,"value":395},{"type":83,"tag":117,"props":1065,"children":1066},{"style":186},[1067],{"type":89,"value":400},{"type":83,"tag":117,"props":1069,"children":1070},{"style":262},[1071],{"type":89,"value":1072}," useSWRMutation",{"type":83,"tag":117,"props":1074,"children":1075},{"style":408},[1076],{"type":89,"value":285},{"type":83,"tag":117,"props":1078,"children":1079},{"style":186},[1080],{"type":89,"value":415},{"type":83,"tag":117,"props":1082,"children":1083},{"style":130},[1084],{"type":89,"value":420},{"type":83,"tag":117,"props":1086,"children":1087},{"style":186},[1088],{"type":89,"value":415},{"type":83,"tag":117,"props":1090,"children":1091},{"style":186},[1092],{"type":89,"value":367},{"type":83,"tag":117,"props":1094,"children":1095},{"style":175},[1096],{"type":89,"value":791},{"type":83,"tag":117,"props":1098,"children":1099},{"style":408},[1100],{"type":89,"value":438},{"type":83,"tag":117,"props":1102,"children":1103},{"class":119,"line":511},[1104],{"type":83,"tag":117,"props":1105,"children":1106},{"emptyLinePlaceholder":205},[1107],{"type":89,"value":208},{"type":83,"tag":117,"props":1109,"children":1110},{"class":119,"line":565},[1111,1115],{"type":83,"tag":117,"props":1112,"children":1113},{"style":169},[1114],{"type":89,"value":571},{"type":83,"tag":117,"props":1116,"children":1117},{"style":408},[1118],{"type":89,"value":1119}," (\n",{"type":83,"tag":117,"props":1121,"children":1122},{"class":119,"line":623},[1123,1128,1133,1138,1143,1148,1153,1158,1163,1167,1171,1175,1179,1183,1187,1191,1196,1200,1204,1208],{"type":83,"tag":117,"props":1124,"children":1125},{"style":186},[1126],{"type":89,"value":1127},"    \u003C",{"type":83,"tag":117,"props":1129,"children":1130},{"style":408},[1131],{"type":89,"value":1132},"button",{"type":83,"tag":117,"props":1134,"children":1135},{"style":215},[1136],{"type":89,"value":1137}," disabled",{"type":83,"tag":117,"props":1139,"children":1140},{"style":186},[1141],{"type":89,"value":1142},"={",{"type":83,"tag":117,"props":1144,"children":1145},{"style":175},[1146],{"type":89,"value":1147},"isMutating",{"type":83,"tag":117,"props":1149,"children":1150},{"style":186},[1151],{"type":89,"value":1152},"} ",{"type":83,"tag":117,"props":1154,"children":1155},{"style":215},[1156],{"type":89,"value":1157},"onClick",{"type":83,"tag":117,"props":1159,"children":1160},{"style":186},[1161],{"type":89,"value":1162},"={()",{"type":83,"tag":117,"props":1164,"children":1165},{"style":215},[1166],{"type":89,"value":259},{"type":83,"tag":117,"props":1168,"children":1169},{"style":262},[1170],{"type":89,"value":1050},{"type":83,"tag":117,"props":1172,"children":1173},{"style":175},[1174],{"type":89,"value":285},{"type":83,"tag":117,"props":1176,"children":1177},{"style":186},[1178],{"type":89,"value":593},{"type":83,"tag":117,"props":1180,"children":1181},{"style":408},[1182],{"type":89,"value":846},{"type":83,"tag":117,"props":1184,"children":1185},{"style":186},[1186],{"type":89,"value":244},{"type":83,"tag":117,"props":1188,"children":1189},{"style":186},[1190],{"type":89,"value":189},{"type":83,"tag":117,"props":1192,"children":1193},{"style":130},[1194],{"type":89,"value":1195},"New Name",{"type":83,"tag":117,"props":1197,"children":1198},{"style":186},[1199],{"type":89,"value":415},{"type":83,"tag":117,"props":1201,"children":1202},{"style":186},[1203],{"type":89,"value":395},{"type":83,"tag":117,"props":1205,"children":1206},{"style":175},[1207],{"type":89,"value":254},{"type":83,"tag":117,"props":1209,"children":1210},{"style":186},[1211],{"type":89,"value":1212},"}>\n",{"type":83,"tag":117,"props":1214,"children":1216},{"class":119,"line":1215},12,[1217],{"type":83,"tag":117,"props":1218,"children":1219},{"style":175},[1220],{"type":89,"value":1221},"      Update\n",{"type":83,"tag":117,"props":1223,"children":1225},{"class":119,"line":1224},13,[1226,1231,1235],{"type":83,"tag":117,"props":1227,"children":1228},{"style":186},[1229],{"type":89,"value":1230},"    \u003C\u002F",{"type":83,"tag":117,"props":1232,"children":1233},{"style":408},[1234],{"type":89,"value":1132},{"type":83,"tag":117,"props":1236,"children":1237},{"style":186},[1238],{"type":89,"value":508},{"type":83,"tag":117,"props":1240,"children":1242},{"class":119,"line":1241},14,[1243],{"type":83,"tag":117,"props":1244,"children":1245},{"style":408},[1246],{"type":89,"value":1247},"  )\n",{"type":83,"tag":117,"props":1249,"children":1251},{"class":119,"line":1250},15,[1252],{"type":83,"tag":117,"props":1253,"children":1254},{"style":186},[1255],{"type":89,"value":629},{"type":83,"tag":146,"props":1257,"children":1259},{"id":1258},"useswrinfinite-pagination-infinite-loading",[1260,1266],{"type":83,"tag":113,"props":1261,"children":1263},{"className":1262},[],[1264],{"type":89,"value":1265},"useSWRInfinite",{"type":89,"value":1267}," — Pagination & Infinite Loading",{"type":83,"tag":105,"props":1269,"children":1271},{"className":157,"code":1270,"language":159,"meta":110,"style":110},"import useSWRInfinite from 'swr\u002Finfinite'\n\nconst getKey = (pageIndex: number, previousPageData: any[]) => {\n  if (previousPageData && !previousPageData.length) return null\n  return `\u002Fapi\u002Fitems?page=${pageIndex}`\n}\n\nfunction Items() {\n  const { data, size, setSize, isLoading } = useSWRInfinite(getKey, fetcher)\n  const items = data ? data.flat() : []\n\n  return (\n    \u003C>\n      {items.map(item => \u003Cdiv key={item.id}>{item.name}\u003C\u002Fdiv>)}\n      \u003Cbutton onClick={() => setSize(size + 1)}>Load More\u003C\u002Fbutton>\n    \u003C\u002F>\n  )\n}\n",[1272],{"type":83,"tag":113,"props":1273,"children":1274},{"__ignoreMap":110},[1275,1304,1311,1380,1432,1463,1470,1477,1497,1572,1624,1631,1642,1650,1752,1823,1832,1840],{"type":83,"tag":117,"props":1276,"children":1277},{"class":119,"line":120},[1278,1282,1287,1291,1295,1300],{"type":83,"tag":117,"props":1279,"children":1280},{"style":169},[1281],{"type":89,"value":172},{"type":83,"tag":117,"props":1283,"children":1284},{"style":175},[1285],{"type":89,"value":1286}," useSWRInfinite ",{"type":83,"tag":117,"props":1288,"children":1289},{"style":169},[1290],{"type":89,"value":183},{"type":83,"tag":117,"props":1292,"children":1293},{"style":186},[1294],{"type":89,"value":189},{"type":83,"tag":117,"props":1296,"children":1297},{"style":130},[1298],{"type":89,"value":1299},"swr\u002Finfinite",{"type":83,"tag":117,"props":1301,"children":1302},{"style":186},[1303],{"type":89,"value":198},{"type":83,"tag":117,"props":1305,"children":1306},{"class":119,"line":201},[1307],{"type":83,"tag":117,"props":1308,"children":1309},{"emptyLinePlaceholder":205},[1310],{"type":89,"value":208},{"type":83,"tag":117,"props":1312,"children":1313},{"class":119,"line":211},[1314,1318,1323,1327,1331,1336,1340,1345,1349,1354,1358,1363,1368,1372,1376],{"type":83,"tag":117,"props":1315,"children":1316},{"style":215},[1317],{"type":89,"value":218},{"type":83,"tag":117,"props":1319,"children":1320},{"style":175},[1321],{"type":89,"value":1322}," getKey ",{"type":83,"tag":117,"props":1324,"children":1325},{"style":186},[1326],{"type":89,"value":228},{"type":83,"tag":117,"props":1328,"children":1329},{"style":186},[1330],{"type":89,"value":233},{"type":83,"tag":117,"props":1332,"children":1333},{"style":236},[1334],{"type":89,"value":1335},"pageIndex",{"type":83,"tag":117,"props":1337,"children":1338},{"style":186},[1339],{"type":89,"value":244},{"type":83,"tag":117,"props":1341,"children":1342},{"style":124},[1343],{"type":89,"value":1344}," number",{"type":83,"tag":117,"props":1346,"children":1347},{"style":186},[1348],{"type":89,"value":367},{"type":83,"tag":117,"props":1350,"children":1351},{"style":236},[1352],{"type":89,"value":1353}," previousPageData",{"type":83,"tag":117,"props":1355,"children":1356},{"style":186},[1357],{"type":89,"value":244},{"type":83,"tag":117,"props":1359,"children":1360},{"style":124},[1361],{"type":89,"value":1362}," any",{"type":83,"tag":117,"props":1364,"children":1365},{"style":175},[1366],{"type":89,"value":1367},"[]",{"type":83,"tag":117,"props":1369,"children":1370},{"style":186},[1371],{"type":89,"value":254},{"type":83,"tag":117,"props":1373,"children":1374},{"style":215},[1375],{"type":89,"value":259},{"type":83,"tag":117,"props":1377,"children":1378},{"style":186},[1379],{"type":89,"value":344},{"type":83,"tag":117,"props":1381,"children":1382},{"class":119,"line":41},[1383,1387,1391,1396,1401,1406,1410,1414,1419,1423,1427],{"type":83,"tag":117,"props":1384,"children":1385},{"style":169},[1386],{"type":89,"value":455},{"type":83,"tag":117,"props":1388,"children":1389},{"style":408},[1390],{"type":89,"value":233},{"type":83,"tag":117,"props":1392,"children":1393},{"style":175},[1394],{"type":89,"value":1395},"previousPageData",{"type":83,"tag":117,"props":1397,"children":1398},{"style":186},[1399],{"type":89,"value":1400}," &&",{"type":83,"tag":117,"props":1402,"children":1403},{"style":186},[1404],{"type":89,"value":1405}," !",{"type":83,"tag":117,"props":1407,"children":1408},{"style":175},[1409],{"type":89,"value":1395},{"type":83,"tag":117,"props":1411,"children":1412},{"style":186},[1413],{"type":89,"value":275},{"type":83,"tag":117,"props":1415,"children":1416},{"style":175},[1417],{"type":89,"value":1418},"length",{"type":83,"tag":117,"props":1420,"children":1421},{"style":408},[1422],{"type":89,"value":469},{"type":83,"tag":117,"props":1424,"children":1425},{"style":169},[1426],{"type":89,"value":474},{"type":83,"tag":117,"props":1428,"children":1429},{"style":186},[1430],{"type":89,"value":1431}," null\n",{"type":83,"tag":117,"props":1433,"children":1434},{"class":119,"line":323},[1435,1439,1444,1449,1454,1458],{"type":83,"tag":117,"props":1436,"children":1437},{"style":169},[1438],{"type":89,"value":571},{"type":83,"tag":117,"props":1440,"children":1441},{"style":186},[1442],{"type":89,"value":1443}," `",{"type":83,"tag":117,"props":1445,"children":1446},{"style":130},[1447],{"type":89,"value":1448},"\u002Fapi\u002Fitems?page=",{"type":83,"tag":117,"props":1450,"children":1451},{"style":186},[1452],{"type":89,"value":1453},"${",{"type":83,"tag":117,"props":1455,"children":1456},{"style":175},[1457],{"type":89,"value":1335},{"type":83,"tag":117,"props":1459,"children":1460},{"style":186},[1461],{"type":89,"value":1462},"}`\n",{"type":83,"tag":117,"props":1464,"children":1465},{"class":119,"line":78},[1466],{"type":83,"tag":117,"props":1467,"children":1468},{"style":186},[1469],{"type":89,"value":629},{"type":83,"tag":117,"props":1471,"children":1472},{"class":119,"line":441},[1473],{"type":83,"tag":117,"props":1474,"children":1475},{"emptyLinePlaceholder":205},[1476],{"type":89,"value":208},{"type":83,"tag":117,"props":1478,"children":1479},{"class":119,"line":449},[1480,1484,1489,1493],{"type":83,"tag":117,"props":1481,"children":1482},{"style":215},[1483],{"type":89,"value":329},{"type":83,"tag":117,"props":1485,"children":1486},{"style":262},[1487],{"type":89,"value":1488}," Items",{"type":83,"tag":117,"props":1490,"children":1491},{"style":186},[1492],{"type":89,"value":339},{"type":83,"tag":117,"props":1494,"children":1495},{"style":186},[1496],{"type":89,"value":344},{"type":83,"tag":117,"props":1498,"children":1499},{"class":119,"line":511},[1500,1504,1508,1512,1516,1521,1525,1530,1534,1538,1542,1546,1551,1555,1560,1564,1568],{"type":83,"tag":117,"props":1501,"children":1502},{"style":215},[1503],{"type":89,"value":352},{"type":83,"tag":117,"props":1505,"children":1506},{"style":186},[1507],{"type":89,"value":357},{"type":83,"tag":117,"props":1509,"children":1510},{"style":175},[1511],{"type":89,"value":362},{"type":83,"tag":117,"props":1513,"children":1514},{"style":186},[1515],{"type":89,"value":367},{"type":83,"tag":117,"props":1517,"children":1518},{"style":175},[1519],{"type":89,"value":1520}," size",{"type":83,"tag":117,"props":1522,"children":1523},{"style":186},[1524],{"type":89,"value":367},{"type":83,"tag":117,"props":1526,"children":1527},{"style":175},[1528],{"type":89,"value":1529}," setSize",{"type":83,"tag":117,"props":1531,"children":1532},{"style":186},[1533],{"type":89,"value":367},{"type":83,"tag":117,"props":1535,"children":1536},{"style":175},[1537],{"type":89,"value":381},{"type":83,"tag":117,"props":1539,"children":1540},{"style":186},[1541],{"type":89,"value":395},{"type":83,"tag":117,"props":1543,"children":1544},{"style":186},[1545],{"type":89,"value":400},{"type":83,"tag":117,"props":1547,"children":1548},{"style":262},[1549],{"type":89,"value":1550}," useSWRInfinite",{"type":83,"tag":117,"props":1552,"children":1553},{"style":408},[1554],{"type":89,"value":285},{"type":83,"tag":117,"props":1556,"children":1557},{"style":175},[1558],{"type":89,"value":1559},"getKey",{"type":83,"tag":117,"props":1561,"children":1562},{"style":186},[1563],{"type":89,"value":367},{"type":83,"tag":117,"props":1565,"children":1566},{"style":175},[1567],{"type":89,"value":433},{"type":83,"tag":117,"props":1569,"children":1570},{"style":408},[1571],{"type":89,"value":438},{"type":83,"tag":117,"props":1573,"children":1574},{"class":119,"line":565},[1575,1579,1584,1588,1592,1597,1601,1605,1610,1615,1619],{"type":83,"tag":117,"props":1576,"children":1577},{"style":215},[1578],{"type":89,"value":352},{"type":83,"tag":117,"props":1580,"children":1581},{"style":175},[1582],{"type":89,"value":1583}," items",{"type":83,"tag":117,"props":1585,"children":1586},{"style":186},[1587],{"type":89,"value":400},{"type":83,"tag":117,"props":1589,"children":1590},{"style":175},[1591],{"type":89,"value":362},{"type":83,"tag":117,"props":1593,"children":1594},{"style":186},[1595],{"type":89,"value":1596}," ?",{"type":83,"tag":117,"props":1598,"children":1599},{"style":175},[1600],{"type":89,"value":362},{"type":83,"tag":117,"props":1602,"children":1603},{"style":186},[1604],{"type":89,"value":275},{"type":83,"tag":117,"props":1606,"children":1607},{"style":262},[1608],{"type":89,"value":1609},"flat",{"type":83,"tag":117,"props":1611,"children":1612},{"style":408},[1613],{"type":89,"value":1614},"() ",{"type":83,"tag":117,"props":1616,"children":1617},{"style":186},[1618],{"type":89,"value":244},{"type":83,"tag":117,"props":1620,"children":1621},{"style":408},[1622],{"type":89,"value":1623}," []\n",{"type":83,"tag":117,"props":1625,"children":1626},{"class":119,"line":623},[1627],{"type":83,"tag":117,"props":1628,"children":1629},{"emptyLinePlaceholder":205},[1630],{"type":89,"value":208},{"type":83,"tag":117,"props":1632,"children":1633},{"class":119,"line":1215},[1634,1638],{"type":83,"tag":117,"props":1635,"children":1636},{"style":169},[1637],{"type":89,"value":571},{"type":83,"tag":117,"props":1639,"children":1640},{"style":408},[1641],{"type":89,"value":1119},{"type":83,"tag":117,"props":1643,"children":1644},{"class":119,"line":1224},[1645],{"type":83,"tag":117,"props":1646,"children":1647},{"style":186},[1648],{"type":89,"value":1649},"    \u003C>\n",{"type":83,"tag":117,"props":1651,"children":1652},{"class":119,"line":1241},[1653,1658,1663,1667,1672,1676,1681,1685,1689,1693,1698,1702,1706,1710,1715,1720,1724,1728,1732,1736,1740,1744,1748],{"type":83,"tag":117,"props":1654,"children":1655},{"style":186},[1656],{"type":89,"value":1657},"      {",{"type":83,"tag":117,"props":1659,"children":1660},{"style":175},[1661],{"type":89,"value":1662},"items",{"type":83,"tag":117,"props":1664,"children":1665},{"style":186},[1666],{"type":89,"value":275},{"type":83,"tag":117,"props":1668,"children":1669},{"style":262},[1670],{"type":89,"value":1671},"map",{"type":83,"tag":117,"props":1673,"children":1674},{"style":175},[1675],{"type":89,"value":285},{"type":83,"tag":117,"props":1677,"children":1678},{"style":236},[1679],{"type":89,"value":1680},"item",{"type":83,"tag":117,"props":1682,"children":1683},{"style":215},[1684],{"type":89,"value":259},{"type":83,"tag":117,"props":1686,"children":1687},{"style":186},[1688],{"type":89,"value":479},{"type":83,"tag":117,"props":1690,"children":1691},{"style":408},[1692],{"type":89,"value":484},{"type":83,"tag":117,"props":1694,"children":1695},{"style":215},[1696],{"type":89,"value":1697}," key",{"type":83,"tag":117,"props":1699,"children":1700},{"style":186},[1701],{"type":89,"value":1142},{"type":83,"tag":117,"props":1703,"children":1704},{"style":175},[1705],{"type":89,"value":1680},{"type":83,"tag":117,"props":1707,"children":1708},{"style":186},[1709],{"type":89,"value":275},{"type":83,"tag":117,"props":1711,"children":1712},{"style":175},[1713],{"type":89,"value":1714},"id",{"type":83,"tag":117,"props":1716,"children":1717},{"style":186},[1718],{"type":89,"value":1719},"}>{",{"type":83,"tag":117,"props":1721,"children":1722},{"style":175},[1723],{"type":89,"value":1680},{"type":83,"tag":117,"props":1725,"children":1726},{"style":186},[1727],{"type":89,"value":275},{"type":83,"tag":117,"props":1729,"children":1730},{"style":175},[1731],{"type":89,"value":607},{"type":83,"tag":117,"props":1733,"children":1734},{"style":186},[1735],{"type":89,"value":612},{"type":83,"tag":117,"props":1737,"children":1738},{"style":408},[1739],{"type":89,"value":484},{"type":83,"tag":117,"props":1741,"children":1742},{"style":186},[1743],{"type":89,"value":489},{"type":83,"tag":117,"props":1745,"children":1746},{"style":175},[1747],{"type":89,"value":254},{"type":83,"tag":117,"props":1749,"children":1750},{"style":186},[1751],{"type":89,"value":629},{"type":83,"tag":117,"props":1753,"children":1754},{"class":119,"line":1250},[1755,1760,1764,1769,1773,1777,1781,1786,1791,1797,1801,1806,1811,1815,1819],{"type":83,"tag":117,"props":1756,"children":1757},{"style":186},[1758],{"type":89,"value":1759},"      \u003C",{"type":83,"tag":117,"props":1761,"children":1762},{"style":408},[1763],{"type":89,"value":1132},{"type":83,"tag":117,"props":1765,"children":1766},{"style":215},[1767],{"type":89,"value":1768}," onClick",{"type":83,"tag":117,"props":1770,"children":1771},{"style":186},[1772],{"type":89,"value":1162},{"type":83,"tag":117,"props":1774,"children":1775},{"style":215},[1776],{"type":89,"value":259},{"type":83,"tag":117,"props":1778,"children":1779},{"style":262},[1780],{"type":89,"value":1529},{"type":83,"tag":117,"props":1782,"children":1783},{"style":175},[1784],{"type":89,"value":1785},"(size ",{"type":83,"tag":117,"props":1787,"children":1788},{"style":186},[1789],{"type":89,"value":1790},"+",{"type":83,"tag":117,"props":1792,"children":1794},{"style":1793},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1795],{"type":89,"value":1796}," 1",{"type":83,"tag":117,"props":1798,"children":1799},{"style":175},[1800],{"type":89,"value":254},{"type":83,"tag":117,"props":1802,"children":1803},{"style":186},[1804],{"type":89,"value":1805},"}>",{"type":83,"tag":117,"props":1807,"children":1808},{"style":175},[1809],{"type":89,"value":1810},"Load More",{"type":83,"tag":117,"props":1812,"children":1813},{"style":186},[1814],{"type":89,"value":499},{"type":83,"tag":117,"props":1816,"children":1817},{"style":408},[1818],{"type":89,"value":1132},{"type":83,"tag":117,"props":1820,"children":1821},{"style":186},[1822],{"type":89,"value":508},{"type":83,"tag":117,"props":1824,"children":1826},{"class":119,"line":1825},16,[1827],{"type":83,"tag":117,"props":1828,"children":1829},{"style":186},[1830],{"type":89,"value":1831},"    \u003C\u002F>\n",{"type":83,"tag":117,"props":1833,"children":1835},{"class":119,"line":1834},17,[1836],{"type":83,"tag":117,"props":1837,"children":1838},{"style":408},[1839],{"type":89,"value":1247},{"type":83,"tag":117,"props":1841,"children":1843},{"class":119,"line":1842},18,[1844],{"type":83,"tag":117,"props":1845,"children":1846},{"style":186},[1847],{"type":89,"value":629},{"type":83,"tag":98,"props":1849,"children":1851},{"id":1850},"global-configuration",[1852],{"type":89,"value":1853},"Global Configuration",{"type":83,"tag":92,"props":1855,"children":1856},{},[1857,1859,1865],{"type":89,"value":1858},"Wrap your app (or a subtree) with ",{"type":83,"tag":113,"props":1860,"children":1862},{"className":1861},[],[1863],{"type":89,"value":1864},"SWRConfig",{"type":89,"value":1866}," to set defaults:",{"type":83,"tag":105,"props":1868,"children":1870},{"className":157,"code":1869,"language":159,"meta":110,"style":110},"import { SWRConfig } from 'swr'\n\nfunction App() {\n  return (\n    \u003CSWRConfig value={{\n      fetcher: (url: string) => fetch(url).then(res => res.json()),\n      revalidateOnFocus: false,\n      dedupingInterval: 5000,\n    }}>\n      \u003CDashboard \u002F>\n    \u003C\u002FSWRConfig>\n  )\n}\n",[1871],{"type":83,"tag":113,"props":1872,"children":1873},{"__ignoreMap":110},[1874,1911,1918,1938,1949,1970,2056,2078,2099,2107,2124,2139,2146],{"type":83,"tag":117,"props":1875,"children":1876},{"class":119,"line":120},[1877,1881,1885,1890,1894,1899,1903,1907],{"type":83,"tag":117,"props":1878,"children":1879},{"style":169},[1880],{"type":89,"value":172},{"type":83,"tag":117,"props":1882,"children":1883},{"style":186},[1884],{"type":89,"value":357},{"type":83,"tag":117,"props":1886,"children":1887},{"style":175},[1888],{"type":89,"value":1889}," SWRConfig",{"type":83,"tag":117,"props":1891,"children":1892},{"style":186},[1893],{"type":89,"value":395},{"type":83,"tag":117,"props":1895,"children":1896},{"style":169},[1897],{"type":89,"value":1898}," from",{"type":83,"tag":117,"props":1900,"children":1901},{"style":186},[1902],{"type":89,"value":189},{"type":83,"tag":117,"props":1904,"children":1905},{"style":130},[1906],{"type":89,"value":4},{"type":83,"tag":117,"props":1908,"children":1909},{"style":186},[1910],{"type":89,"value":198},{"type":83,"tag":117,"props":1912,"children":1913},{"class":119,"line":201},[1914],{"type":83,"tag":117,"props":1915,"children":1916},{"emptyLinePlaceholder":205},[1917],{"type":89,"value":208},{"type":83,"tag":117,"props":1919,"children":1920},{"class":119,"line":211},[1921,1925,1930,1934],{"type":83,"tag":117,"props":1922,"children":1923},{"style":215},[1924],{"type":89,"value":329},{"type":83,"tag":117,"props":1926,"children":1927},{"style":262},[1928],{"type":89,"value":1929}," App",{"type":83,"tag":117,"props":1931,"children":1932},{"style":186},[1933],{"type":89,"value":339},{"type":83,"tag":117,"props":1935,"children":1936},{"style":186},[1937],{"type":89,"value":344},{"type":83,"tag":117,"props":1939,"children":1940},{"class":119,"line":41},[1941,1945],{"type":83,"tag":117,"props":1942,"children":1943},{"style":169},[1944],{"type":89,"value":571},{"type":83,"tag":117,"props":1946,"children":1947},{"style":408},[1948],{"type":89,"value":1119},{"type":83,"tag":117,"props":1950,"children":1951},{"class":119,"line":323},[1952,1956,1960,1965],{"type":83,"tag":117,"props":1953,"children":1954},{"style":186},[1955],{"type":89,"value":1127},{"type":83,"tag":117,"props":1957,"children":1958},{"style":124},[1959],{"type":89,"value":1864},{"type":83,"tag":117,"props":1961,"children":1962},{"style":215},[1963],{"type":89,"value":1964}," value",{"type":83,"tag":117,"props":1966,"children":1967},{"style":186},[1968],{"type":89,"value":1969},"={{\n",{"type":83,"tag":117,"props":1971,"children":1972},{"class":119,"line":78},[1973,1978,1982,1986,1990,1994,1998,2002,2006,2010,2014,2018,2022,2026,2030,2034,2038,2042,2046,2051],{"type":83,"tag":117,"props":1974,"children":1975},{"style":262},[1976],{"type":89,"value":1977},"      fetcher",{"type":83,"tag":117,"props":1979,"children":1980},{"style":186},[1981],{"type":89,"value":244},{"type":83,"tag":117,"props":1983,"children":1984},{"style":186},[1985],{"type":89,"value":233},{"type":83,"tag":117,"props":1987,"children":1988},{"style":236},[1989],{"type":89,"value":239},{"type":83,"tag":117,"props":1991,"children":1992},{"style":186},[1993],{"type":89,"value":244},{"type":83,"tag":117,"props":1995,"children":1996},{"style":124},[1997],{"type":89,"value":249},{"type":83,"tag":117,"props":1999,"children":2000},{"style":186},[2001],{"type":89,"value":254},{"type":83,"tag":117,"props":2003,"children":2004},{"style":215},[2005],{"type":89,"value":259},{"type":83,"tag":117,"props":2007,"children":2008},{"style":262},[2009],{"type":89,"value":265},{"type":83,"tag":117,"props":2011,"children":2012},{"style":175},[2013],{"type":89,"value":270},{"type":83,"tag":117,"props":2015,"children":2016},{"style":186},[2017],{"type":89,"value":275},{"type":83,"tag":117,"props":2019,"children":2020},{"style":262},[2021],{"type":89,"value":280},{"type":83,"tag":117,"props":2023,"children":2024},{"style":175},[2025],{"type":89,"value":285},{"type":83,"tag":117,"props":2027,"children":2028},{"style":236},[2029],{"type":89,"value":290},{"type":83,"tag":117,"props":2031,"children":2032},{"style":215},[2033],{"type":89,"value":259},{"type":83,"tag":117,"props":2035,"children":2036},{"style":175},[2037],{"type":89,"value":299},{"type":83,"tag":117,"props":2039,"children":2040},{"style":186},[2041],{"type":89,"value":275},{"type":83,"tag":117,"props":2043,"children":2044},{"style":262},[2045],{"type":89,"value":308},{"type":83,"tag":117,"props":2047,"children":2048},{"style":175},[2049],{"type":89,"value":2050},"())",{"type":83,"tag":117,"props":2052,"children":2053},{"style":186},[2054],{"type":89,"value":2055},",\n",{"type":83,"tag":117,"props":2057,"children":2058},{"class":119,"line":441},[2059,2064,2068,2074],{"type":83,"tag":117,"props":2060,"children":2061},{"style":408},[2062],{"type":89,"value":2063},"      revalidateOnFocus",{"type":83,"tag":117,"props":2065,"children":2066},{"style":186},[2067],{"type":89,"value":244},{"type":83,"tag":117,"props":2069,"children":2071},{"style":2070},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[2072],{"type":89,"value":2073}," false",{"type":83,"tag":117,"props":2075,"children":2076},{"style":186},[2077],{"type":89,"value":2055},{"type":83,"tag":117,"props":2079,"children":2080},{"class":119,"line":449},[2081,2086,2090,2095],{"type":83,"tag":117,"props":2082,"children":2083},{"style":408},[2084],{"type":89,"value":2085},"      dedupingInterval",{"type":83,"tag":117,"props":2087,"children":2088},{"style":186},[2089],{"type":89,"value":244},{"type":83,"tag":117,"props":2091,"children":2092},{"style":1793},[2093],{"type":89,"value":2094}," 5000",{"type":83,"tag":117,"props":2096,"children":2097},{"style":186},[2098],{"type":89,"value":2055},{"type":83,"tag":117,"props":2100,"children":2101},{"class":119,"line":511},[2102],{"type":83,"tag":117,"props":2103,"children":2104},{"style":186},[2105],{"type":89,"value":2106},"    }}>\n",{"type":83,"tag":117,"props":2108,"children":2109},{"class":119,"line":565},[2110,2114,2119],{"type":83,"tag":117,"props":2111,"children":2112},{"style":186},[2113],{"type":89,"value":1759},{"type":83,"tag":117,"props":2115,"children":2116},{"style":124},[2117],{"type":89,"value":2118},"Dashboard",{"type":83,"tag":117,"props":2120,"children":2121},{"style":186},[2122],{"type":89,"value":2123}," \u002F>\n",{"type":83,"tag":117,"props":2125,"children":2126},{"class":119,"line":623},[2127,2131,2135],{"type":83,"tag":117,"props":2128,"children":2129},{"style":186},[2130],{"type":89,"value":1230},{"type":83,"tag":117,"props":2132,"children":2133},{"style":124},[2134],{"type":89,"value":1864},{"type":83,"tag":117,"props":2136,"children":2137},{"style":186},[2138],{"type":89,"value":508},{"type":83,"tag":117,"props":2140,"children":2141},{"class":119,"line":1215},[2142],{"type":83,"tag":117,"props":2143,"children":2144},{"style":408},[2145],{"type":89,"value":1247},{"type":83,"tag":117,"props":2147,"children":2148},{"class":119,"line":1224},[2149],{"type":83,"tag":117,"props":2150,"children":2151},{"style":186},[2152],{"type":89,"value":629},{"type":83,"tag":98,"props":2154,"children":2156},{"id":2155},"revalidation-strategies",[2157],{"type":89,"value":2158},"Revalidation Strategies",{"type":83,"tag":2160,"props":2161,"children":2162},"table",{},[2163,2187],{"type":83,"tag":2164,"props":2165,"children":2166},"thead",{},[2167],{"type":83,"tag":2168,"props":2169,"children":2170},"tr",{},[2171,2177,2182],{"type":83,"tag":2172,"props":2173,"children":2174},"th",{},[2175],{"type":89,"value":2176},"Strategy",{"type":83,"tag":2172,"props":2178,"children":2179},{},[2180],{"type":89,"value":2181},"Option",{"type":83,"tag":2172,"props":2183,"children":2184},{},[2185],{"type":89,"value":2186},"Default",{"type":83,"tag":2188,"props":2189,"children":2190},"tbody",{},[2191,2218,2243,2268,2296],{"type":83,"tag":2168,"props":2192,"children":2193},{},[2194,2200,2209],{"type":83,"tag":2195,"props":2196,"children":2197},"td",{},[2198],{"type":89,"value":2199},"On window focus",{"type":83,"tag":2195,"props":2201,"children":2202},{},[2203],{"type":83,"tag":113,"props":2204,"children":2206},{"className":2205},[],[2207],{"type":89,"value":2208},"revalidateOnFocus",{"type":83,"tag":2195,"props":2210,"children":2211},{},[2212],{"type":83,"tag":113,"props":2213,"children":2215},{"className":2214},[],[2216],{"type":89,"value":2217},"true",{"type":83,"tag":2168,"props":2219,"children":2220},{},[2221,2226,2235],{"type":83,"tag":2195,"props":2222,"children":2223},{},[2224],{"type":89,"value":2225},"On network recovery",{"type":83,"tag":2195,"props":2227,"children":2228},{},[2229],{"type":83,"tag":113,"props":2230,"children":2232},{"className":2231},[],[2233],{"type":89,"value":2234},"revalidateOnReconnect",{"type":83,"tag":2195,"props":2236,"children":2237},{},[2238],{"type":83,"tag":113,"props":2239,"children":2241},{"className":2240},[],[2242],{"type":89,"value":2217},{"type":83,"tag":2168,"props":2244,"children":2245},{},[2246,2251,2260],{"type":83,"tag":2195,"props":2247,"children":2248},{},[2249],{"type":89,"value":2250},"On mount if stale",{"type":83,"tag":2195,"props":2252,"children":2253},{},[2254],{"type":83,"tag":113,"props":2255,"children":2257},{"className":2256},[],[2258],{"type":89,"value":2259},"revalidateIfStale",{"type":83,"tag":2195,"props":2261,"children":2262},{},[2263],{"type":83,"tag":113,"props":2264,"children":2266},{"className":2265},[],[2267],{"type":89,"value":2217},{"type":83,"tag":2168,"props":2269,"children":2270},{},[2271,2276,2285],{"type":83,"tag":2195,"props":2272,"children":2273},{},[2274],{"type":89,"value":2275},"Polling",{"type":83,"tag":2195,"props":2277,"children":2278},{},[2279],{"type":83,"tag":113,"props":2280,"children":2282},{"className":2281},[],[2283],{"type":89,"value":2284},"refreshInterval",{"type":83,"tag":2195,"props":2286,"children":2287},{},[2288,2294],{"type":83,"tag":113,"props":2289,"children":2291},{"className":2290},[],[2292],{"type":89,"value":2293},"0",{"type":89,"value":2295}," (disabled)",{"type":83,"tag":2168,"props":2297,"children":2298},{},[2299,2304,2315],{"type":83,"tag":2195,"props":2300,"children":2301},{},[2302],{"type":89,"value":2303},"Manual",{"type":83,"tag":2195,"props":2305,"children":2306},{},[2307,2309],{"type":89,"value":2308},"Call ",{"type":83,"tag":113,"props":2310,"children":2312},{"className":2311},[],[2313],{"type":89,"value":2314},"mutate()",{"type":83,"tag":2195,"props":2316,"children":2317},{},[2318],{"type":89,"value":2319},"—",{"type":83,"tag":98,"props":2321,"children":2323},{"id":2322},"optimistic-updates",[2324],{"type":89,"value":2325},"Optimistic Updates",{"type":83,"tag":105,"props":2327,"children":2329},{"className":157,"code":2328,"language":159,"meta":110,"style":110},"const { trigger } = useSWRMutation('\u002Fapi\u002Fuser', updateUser, {\n  optimisticData: (current) => ({ ...current, name: 'New Name' }),\n  rollbackOnError: true,\n  populateCache: true,\n  revalidate: false,\n})\n",[2330],{"type":83,"tag":113,"props":2331,"children":2332},{"__ignoreMap":110},[2333,2393,2475,2496,2516,2536],{"type":83,"tag":117,"props":2334,"children":2335},{"class":119,"line":120},[2336,2340,2344,2349,2353,2357,2361,2365,2369,2373,2377,2381,2385,2389],{"type":83,"tag":117,"props":2337,"children":2338},{"style":215},[2339],{"type":89,"value":218},{"type":83,"tag":117,"props":2341,"children":2342},{"style":186},[2343],{"type":89,"value":357},{"type":83,"tag":117,"props":2345,"children":2346},{"style":175},[2347],{"type":89,"value":2348}," trigger ",{"type":83,"tag":117,"props":2350,"children":2351},{"style":186},[2352],{"type":89,"value":961},{"type":83,"tag":117,"props":2354,"children":2355},{"style":186},[2356],{"type":89,"value":400},{"type":83,"tag":117,"props":2358,"children":2359},{"style":262},[2360],{"type":89,"value":1072},{"type":83,"tag":117,"props":2362,"children":2363},{"style":175},[2364],{"type":89,"value":285},{"type":83,"tag":117,"props":2366,"children":2367},{"style":186},[2368],{"type":89,"value":415},{"type":83,"tag":117,"props":2370,"children":2371},{"style":130},[2372],{"type":89,"value":420},{"type":83,"tag":117,"props":2374,"children":2375},{"style":186},[2376],{"type":89,"value":415},{"type":83,"tag":117,"props":2378,"children":2379},{"style":186},[2380],{"type":89,"value":367},{"type":83,"tag":117,"props":2382,"children":2383},{"style":175},[2384],{"type":89,"value":791},{"type":83,"tag":117,"props":2386,"children":2387},{"style":186},[2388],{"type":89,"value":367},{"type":83,"tag":117,"props":2390,"children":2391},{"style":186},[2392],{"type":89,"value":344},{"type":83,"tag":117,"props":2394,"children":2395},{"class":119,"line":201},[2396,2401,2405,2409,2414,2418,2422,2426,2430,2435,2439,2443,2447,2451,2455,2459,2463,2467,2471],{"type":83,"tag":117,"props":2397,"children":2398},{"style":262},[2399],{"type":89,"value":2400},"  optimisticData",{"type":83,"tag":117,"props":2402,"children":2403},{"style":186},[2404],{"type":89,"value":244},{"type":83,"tag":117,"props":2406,"children":2407},{"style":186},[2408],{"type":89,"value":233},{"type":83,"tag":117,"props":2410,"children":2411},{"style":236},[2412],{"type":89,"value":2413},"current",{"type":83,"tag":117,"props":2415,"children":2416},{"style":186},[2417],{"type":89,"value":254},{"type":83,"tag":117,"props":2419,"children":2420},{"style":215},[2421],{"type":89,"value":259},{"type":83,"tag":117,"props":2423,"children":2424},{"style":175},[2425],{"type":89,"value":233},{"type":83,"tag":117,"props":2427,"children":2428},{"style":186},[2429],{"type":89,"value":593},{"type":83,"tag":117,"props":2431,"children":2432},{"style":186},[2433],{"type":89,"value":2434}," ...",{"type":83,"tag":117,"props":2436,"children":2437},{"style":175},[2438],{"type":89,"value":2413},{"type":83,"tag":117,"props":2440,"children":2441},{"style":186},[2442],{"type":89,"value":367},{"type":83,"tag":117,"props":2444,"children":2445},{"style":408},[2446],{"type":89,"value":846},{"type":83,"tag":117,"props":2448,"children":2449},{"style":186},[2450],{"type":89,"value":244},{"type":83,"tag":117,"props":2452,"children":2453},{"style":186},[2454],{"type":89,"value":189},{"type":83,"tag":117,"props":2456,"children":2457},{"style":130},[2458],{"type":89,"value":1195},{"type":83,"tag":117,"props":2460,"children":2461},{"style":186},[2462],{"type":89,"value":415},{"type":83,"tag":117,"props":2464,"children":2465},{"style":186},[2466],{"type":89,"value":395},{"type":83,"tag":117,"props":2468,"children":2469},{"style":175},[2470],{"type":89,"value":254},{"type":83,"tag":117,"props":2472,"children":2473},{"style":186},[2474],{"type":89,"value":2055},{"type":83,"tag":117,"props":2476,"children":2477},{"class":119,"line":211},[2478,2483,2487,2492],{"type":83,"tag":117,"props":2479,"children":2480},{"style":408},[2481],{"type":89,"value":2482},"  rollbackOnError",{"type":83,"tag":117,"props":2484,"children":2485},{"style":186},[2486],{"type":89,"value":244},{"type":83,"tag":117,"props":2488,"children":2489},{"style":2070},[2490],{"type":89,"value":2491}," true",{"type":83,"tag":117,"props":2493,"children":2494},{"style":186},[2495],{"type":89,"value":2055},{"type":83,"tag":117,"props":2497,"children":2498},{"class":119,"line":41},[2499,2504,2508,2512],{"type":83,"tag":117,"props":2500,"children":2501},{"style":408},[2502],{"type":89,"value":2503},"  populateCache",{"type":83,"tag":117,"props":2505,"children":2506},{"style":186},[2507],{"type":89,"value":244},{"type":83,"tag":117,"props":2509,"children":2510},{"style":2070},[2511],{"type":89,"value":2491},{"type":83,"tag":117,"props":2513,"children":2514},{"style":186},[2515],{"type":89,"value":2055},{"type":83,"tag":117,"props":2517,"children":2518},{"class":119,"line":323},[2519,2524,2528,2532],{"type":83,"tag":117,"props":2520,"children":2521},{"style":408},[2522],{"type":89,"value":2523},"  revalidate",{"type":83,"tag":117,"props":2525,"children":2526},{"style":186},[2527],{"type":89,"value":244},{"type":83,"tag":117,"props":2529,"children":2530},{"style":2070},[2531],{"type":89,"value":2073},{"type":83,"tag":117,"props":2533,"children":2534},{"style":186},[2535],{"type":89,"value":2055},{"type":83,"tag":117,"props":2537,"children":2538},{"class":119,"line":78},[2539,2543],{"type":83,"tag":117,"props":2540,"children":2541},{"style":186},[2542],{"type":89,"value":961},{"type":83,"tag":117,"props":2544,"children":2545},{"style":175},[2546],{"type":89,"value":438},{"type":83,"tag":98,"props":2548,"children":2550},{"id":2549},"conditional-fetching",[2551],{"type":89,"value":2552},"Conditional Fetching",{"type":83,"tag":92,"props":2554,"children":2555},{},[2556,2558,2564],{"type":89,"value":2557},"Pass ",{"type":83,"tag":113,"props":2559,"children":2561},{"className":2560},[],[2562],{"type":89,"value":2563},"null",{"type":89,"value":2565}," or a falsy key to skip fetching:",{"type":83,"tag":105,"props":2567,"children":2569},{"className":157,"code":2568,"language":159,"meta":110,"style":110},"const { data } = useSWR(userId ? `\u002Fapi\u002Fuser\u002F${userId}` : null, fetcher)\n",[2570],{"type":83,"tag":113,"props":2571,"children":2572},{"__ignoreMap":110},[2573],{"type":83,"tag":117,"props":2574,"children":2575},{"class":119,"line":120},[2576,2580,2584,2589,2593,2597,2601,2606,2611,2615,2620,2624,2629,2634,2639,2644],{"type":83,"tag":117,"props":2577,"children":2578},{"style":215},[2579],{"type":89,"value":218},{"type":83,"tag":117,"props":2581,"children":2582},{"style":186},[2583],{"type":89,"value":357},{"type":83,"tag":117,"props":2585,"children":2586},{"style":175},[2587],{"type":89,"value":2588}," data ",{"type":83,"tag":117,"props":2590,"children":2591},{"style":186},[2592],{"type":89,"value":961},{"type":83,"tag":117,"props":2594,"children":2595},{"style":186},[2596],{"type":89,"value":400},{"type":83,"tag":117,"props":2598,"children":2599},{"style":262},[2600],{"type":89,"value":405},{"type":83,"tag":117,"props":2602,"children":2603},{"style":175},[2604],{"type":89,"value":2605},"(userId ",{"type":83,"tag":117,"props":2607,"children":2608},{"style":186},[2609],{"type":89,"value":2610},"?",{"type":83,"tag":117,"props":2612,"children":2613},{"style":186},[2614],{"type":89,"value":1443},{"type":83,"tag":117,"props":2616,"children":2617},{"style":130},[2618],{"type":89,"value":2619},"\u002Fapi\u002Fuser\u002F",{"type":83,"tag":117,"props":2621,"children":2622},{"style":186},[2623],{"type":89,"value":1453},{"type":83,"tag":117,"props":2625,"children":2626},{"style":175},[2627],{"type":89,"value":2628},"userId",{"type":83,"tag":117,"props":2630,"children":2631},{"style":186},[2632],{"type":89,"value":2633},"}`",{"type":83,"tag":117,"props":2635,"children":2636},{"style":186},[2637],{"type":89,"value":2638}," :",{"type":83,"tag":117,"props":2640,"children":2641},{"style":186},[2642],{"type":89,"value":2643}," null,",{"type":83,"tag":117,"props":2645,"children":2646},{"style":175},[2647],{"type":89,"value":2648}," fetcher)\n",{"type":83,"tag":98,"props":2650,"children":2652},{"id":2651},"error-retry",[2653],{"type":89,"value":2654},"Error Retry",{"type":83,"tag":92,"props":2656,"children":2657},{},[2658],{"type":89,"value":2659},"SWR retries on error by default with exponential backoff. Customize with:",{"type":83,"tag":105,"props":2661,"children":2663},{"className":157,"code":2662,"language":159,"meta":110,"style":110},"useSWR(key, fetcher, {\n  onErrorRetry: (error, key, config, revalidate, { retryCount }) => {\n    if (error.status === 404) return \u002F\u002F Don't retry on 404\n    if (retryCount >= 3) return      \u002F\u002F Max 3 retries\n    setTimeout(() => revalidate({ retryCount }), 5000)\n  },\n})\n",[2664],{"type":83,"tag":113,"props":2665,"children":2666},{"__ignoreMap":110},[2667,2695,2766,2815,2854,2910,2918],{"type":83,"tag":117,"props":2668,"children":2669},{"class":119,"line":120},[2670,2674,2679,2683,2687,2691],{"type":83,"tag":117,"props":2671,"children":2672},{"style":262},[2673],{"type":89,"value":154},{"type":83,"tag":117,"props":2675,"children":2676},{"style":175},[2677],{"type":89,"value":2678},"(key",{"type":83,"tag":117,"props":2680,"children":2681},{"style":186},[2682],{"type":89,"value":367},{"type":83,"tag":117,"props":2684,"children":2685},{"style":175},[2686],{"type":89,"value":433},{"type":83,"tag":117,"props":2688,"children":2689},{"style":186},[2690],{"type":89,"value":367},{"type":83,"tag":117,"props":2692,"children":2693},{"style":186},[2694],{"type":89,"value":344},{"type":83,"tag":117,"props":2696,"children":2697},{"class":119,"line":201},[2698,2703,2707,2711,2715,2719,2723,2727,2732,2736,2741,2745,2749,2754,2758,2762],{"type":83,"tag":117,"props":2699,"children":2700},{"style":262},[2701],{"type":89,"value":2702},"  onErrorRetry",{"type":83,"tag":117,"props":2704,"children":2705},{"style":186},[2706],{"type":89,"value":244},{"type":83,"tag":117,"props":2708,"children":2709},{"style":186},[2710],{"type":89,"value":233},{"type":83,"tag":117,"props":2712,"children":2713},{"style":236},[2714],{"type":89,"value":525},{"type":83,"tag":117,"props":2716,"children":2717},{"style":186},[2718],{"type":89,"value":367},{"type":83,"tag":117,"props":2720,"children":2721},{"style":236},[2722],{"type":89,"value":1697},{"type":83,"tag":117,"props":2724,"children":2725},{"style":186},[2726],{"type":89,"value":367},{"type":83,"tag":117,"props":2728,"children":2729},{"style":236},[2730],{"type":89,"value":2731}," config",{"type":83,"tag":117,"props":2733,"children":2734},{"style":186},[2735],{"type":89,"value":367},{"type":83,"tag":117,"props":2737,"children":2738},{"style":236},[2739],{"type":89,"value":2740}," revalidate",{"type":83,"tag":117,"props":2742,"children":2743},{"style":186},[2744],{"type":89,"value":367},{"type":83,"tag":117,"props":2746,"children":2747},{"style":186},[2748],{"type":89,"value":357},{"type":83,"tag":117,"props":2750,"children":2751},{"style":236},[2752],{"type":89,"value":2753}," retryCount",{"type":83,"tag":117,"props":2755,"children":2756},{"style":186},[2757],{"type":89,"value":863},{"type":83,"tag":117,"props":2759,"children":2760},{"style":215},[2761],{"type":89,"value":259},{"type":83,"tag":117,"props":2763,"children":2764},{"style":186},[2765],{"type":89,"value":344},{"type":83,"tag":117,"props":2767,"children":2768},{"class":119,"line":211},[2769,2774,2778,2782,2786,2791,2796,2801,2805,2809],{"type":83,"tag":117,"props":2770,"children":2771},{"style":169},[2772],{"type":89,"value":2773},"    if",{"type":83,"tag":117,"props":2775,"children":2776},{"style":408},[2777],{"type":89,"value":233},{"type":83,"tag":117,"props":2779,"children":2780},{"style":175},[2781],{"type":89,"value":525},{"type":83,"tag":117,"props":2783,"children":2784},{"style":186},[2785],{"type":89,"value":275},{"type":83,"tag":117,"props":2787,"children":2788},{"style":175},[2789],{"type":89,"value":2790},"status",{"type":83,"tag":117,"props":2792,"children":2793},{"style":186},[2794],{"type":89,"value":2795}," ===",{"type":83,"tag":117,"props":2797,"children":2798},{"style":1793},[2799],{"type":89,"value":2800}," 404",{"type":83,"tag":117,"props":2802,"children":2803},{"style":408},[2804],{"type":89,"value":469},{"type":83,"tag":117,"props":2806,"children":2807},{"style":169},[2808],{"type":89,"value":474},{"type":83,"tag":117,"props":2810,"children":2812},{"style":2811},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[2813],{"type":89,"value":2814}," \u002F\u002F Don't retry on 404\n",{"type":83,"tag":117,"props":2816,"children":2817},{"class":119,"line":41},[2818,2822,2826,2831,2836,2841,2845,2849],{"type":83,"tag":117,"props":2819,"children":2820},{"style":169},[2821],{"type":89,"value":2773},{"type":83,"tag":117,"props":2823,"children":2824},{"style":408},[2825],{"type":89,"value":233},{"type":83,"tag":117,"props":2827,"children":2828},{"style":175},[2829],{"type":89,"value":2830},"retryCount",{"type":83,"tag":117,"props":2832,"children":2833},{"style":186},[2834],{"type":89,"value":2835}," >=",{"type":83,"tag":117,"props":2837,"children":2838},{"style":1793},[2839],{"type":89,"value":2840}," 3",{"type":83,"tag":117,"props":2842,"children":2843},{"style":408},[2844],{"type":89,"value":469},{"type":83,"tag":117,"props":2846,"children":2847},{"style":169},[2848],{"type":89,"value":474},{"type":83,"tag":117,"props":2850,"children":2851},{"style":2811},[2852],{"type":89,"value":2853},"      \u002F\u002F Max 3 retries\n",{"type":83,"tag":117,"props":2855,"children":2856},{"class":119,"line":323},[2857,2862,2866,2870,2874,2878,2882,2886,2890,2894,2898,2902,2906],{"type":83,"tag":117,"props":2858,"children":2859},{"style":262},[2860],{"type":89,"value":2861},"    setTimeout",{"type":83,"tag":117,"props":2863,"children":2864},{"style":408},[2865],{"type":89,"value":285},{"type":83,"tag":117,"props":2867,"children":2868},{"style":186},[2869],{"type":89,"value":339},{"type":83,"tag":117,"props":2871,"children":2872},{"style":215},[2873],{"type":89,"value":259},{"type":83,"tag":117,"props":2875,"children":2876},{"style":262},[2877],{"type":89,"value":2740},{"type":83,"tag":117,"props":2879,"children":2880},{"style":408},[2881],{"type":89,"value":285},{"type":83,"tag":117,"props":2883,"children":2884},{"style":186},[2885],{"type":89,"value":593},{"type":83,"tag":117,"props":2887,"children":2888},{"style":175},[2889],{"type":89,"value":2753},{"type":83,"tag":117,"props":2891,"children":2892},{"style":186},[2893],{"type":89,"value":395},{"type":83,"tag":117,"props":2895,"children":2896},{"style":408},[2897],{"type":89,"value":254},{"type":83,"tag":117,"props":2899,"children":2900},{"style":186},[2901],{"type":89,"value":367},{"type":83,"tag":117,"props":2903,"children":2904},{"style":1793},[2905],{"type":89,"value":2094},{"type":83,"tag":117,"props":2907,"children":2908},{"style":408},[2909],{"type":89,"value":438},{"type":83,"tag":117,"props":2911,"children":2912},{"class":119,"line":78},[2913],{"type":83,"tag":117,"props":2914,"children":2915},{"style":186},[2916],{"type":89,"value":2917},"  },\n",{"type":83,"tag":117,"props":2919,"children":2920},{"class":119,"line":441},[2921,2925],{"type":83,"tag":117,"props":2922,"children":2923},{"style":186},[2924],{"type":89,"value":961},{"type":83,"tag":117,"props":2926,"children":2927},{"style":175},[2928],{"type":89,"value":438},{"type":83,"tag":98,"props":2930,"children":2932},{"id":2931},"useswrsubscription-real-time-data-sources",[2933,2939],{"type":83,"tag":113,"props":2934,"children":2936},{"className":2935},[],[2937],{"type":89,"value":2938},"useSWRSubscription",{"type":89,"value":2940}," — Real-Time Data Sources",{"type":83,"tag":92,"props":2942,"children":2943},{},[2944],{"type":89,"value":2945},"Subscribe to real-time data (WebSockets, SSE, etc.) with automatic deduplication:",{"type":83,"tag":105,"props":2947,"children":2949},{"className":157,"code":2948,"language":159,"meta":110,"style":110},"import useSWRSubscription from 'swr\u002Fsubscription'\n\nfunction LivePrice({ symbol }: { symbol: string }) {\n  const { data } = useSWRSubscription(\n    `wss:\u002F\u002Fstream.example.com\u002F${symbol}`,\n    (key, { next }) => {\n      const ws = new WebSocket(key)\n      ws.onmessage = (event) => next(null, JSON.parse(event.data))\n      ws.onerror = (event) => next(event)\n      return () => ws.close()\n    }\n  )\n\n  return \u003Cspan>{data?.price}\u003C\u002Fspan>\n}\n",[2950],{"type":83,"tag":113,"props":2951,"children":2952},{"__ignoreMap":110},[2953,2982,2989,3039,3072,3102,3139,3178,3263,3315,3350,3358,3365,3372,3418],{"type":83,"tag":117,"props":2954,"children":2955},{"class":119,"line":120},[2956,2960,2965,2969,2973,2978],{"type":83,"tag":117,"props":2957,"children":2958},{"style":169},[2959],{"type":89,"value":172},{"type":83,"tag":117,"props":2961,"children":2962},{"style":175},[2963],{"type":89,"value":2964}," useSWRSubscription ",{"type":83,"tag":117,"props":2966,"children":2967},{"style":169},[2968],{"type":89,"value":183},{"type":83,"tag":117,"props":2970,"children":2971},{"style":186},[2972],{"type":89,"value":189},{"type":83,"tag":117,"props":2974,"children":2975},{"style":130},[2976],{"type":89,"value":2977},"swr\u002Fsubscription",{"type":83,"tag":117,"props":2979,"children":2980},{"style":186},[2981],{"type":89,"value":198},{"type":83,"tag":117,"props":2983,"children":2984},{"class":119,"line":201},[2985],{"type":83,"tag":117,"props":2986,"children":2987},{"emptyLinePlaceholder":205},[2988],{"type":89,"value":208},{"type":83,"tag":117,"props":2990,"children":2991},{"class":119,"line":211},[2992,2996,3001,3006,3011,3015,3019,3023,3027,3031,3035],{"type":83,"tag":117,"props":2993,"children":2994},{"style":215},[2995],{"type":89,"value":329},{"type":83,"tag":117,"props":2997,"children":2998},{"style":262},[2999],{"type":89,"value":3000}," LivePrice",{"type":83,"tag":117,"props":3002,"children":3003},{"style":186},[3004],{"type":89,"value":3005},"({",{"type":83,"tag":117,"props":3007,"children":3008},{"style":236},[3009],{"type":89,"value":3010}," symbol",{"type":83,"tag":117,"props":3012,"children":3013},{"style":186},[3014],{"type":89,"value":825},{"type":83,"tag":117,"props":3016,"children":3017},{"style":186},[3018],{"type":89,"value":357},{"type":83,"tag":117,"props":3020,"children":3021},{"style":408},[3022],{"type":89,"value":3010},{"type":83,"tag":117,"props":3024,"children":3025},{"style":186},[3026],{"type":89,"value":244},{"type":83,"tag":117,"props":3028,"children":3029},{"style":124},[3030],{"type":89,"value":249},{"type":83,"tag":117,"props":3032,"children":3033},{"style":186},[3034],{"type":89,"value":863},{"type":83,"tag":117,"props":3036,"children":3037},{"style":186},[3038],{"type":89,"value":344},{"type":83,"tag":117,"props":3040,"children":3041},{"class":119,"line":41},[3042,3046,3050,3054,3058,3062,3067],{"type":83,"tag":117,"props":3043,"children":3044},{"style":215},[3045],{"type":89,"value":352},{"type":83,"tag":117,"props":3047,"children":3048},{"style":186},[3049],{"type":89,"value":357},{"type":83,"tag":117,"props":3051,"children":3052},{"style":175},[3053],{"type":89,"value":362},{"type":83,"tag":117,"props":3055,"children":3056},{"style":186},[3057],{"type":89,"value":395},{"type":83,"tag":117,"props":3059,"children":3060},{"style":186},[3061],{"type":89,"value":400},{"type":83,"tag":117,"props":3063,"children":3064},{"style":262},[3065],{"type":89,"value":3066}," useSWRSubscription",{"type":83,"tag":117,"props":3068,"children":3069},{"style":408},[3070],{"type":89,"value":3071},"(\n",{"type":83,"tag":117,"props":3073,"children":3074},{"class":119,"line":323},[3075,3080,3085,3089,3094,3098],{"type":83,"tag":117,"props":3076,"children":3077},{"style":186},[3078],{"type":89,"value":3079},"    `",{"type":83,"tag":117,"props":3081,"children":3082},{"style":130},[3083],{"type":89,"value":3084},"wss:\u002F\u002Fstream.example.com\u002F",{"type":83,"tag":117,"props":3086,"children":3087},{"style":186},[3088],{"type":89,"value":1453},{"type":83,"tag":117,"props":3090,"children":3091},{"style":175},[3092],{"type":89,"value":3093},"symbol",{"type":83,"tag":117,"props":3095,"children":3096},{"style":186},[3097],{"type":89,"value":2633},{"type":83,"tag":117,"props":3099,"children":3100},{"style":186},[3101],{"type":89,"value":2055},{"type":83,"tag":117,"props":3103,"children":3104},{"class":119,"line":78},[3105,3110,3114,3118,3122,3127,3131,3135],{"type":83,"tag":117,"props":3106,"children":3107},{"style":186},[3108],{"type":89,"value":3109},"    (",{"type":83,"tag":117,"props":3111,"children":3112},{"style":236},[3113],{"type":89,"value":652},{"type":83,"tag":117,"props":3115,"children":3116},{"style":186},[3117],{"type":89,"value":367},{"type":83,"tag":117,"props":3119,"children":3120},{"style":186},[3121],{"type":89,"value":357},{"type":83,"tag":117,"props":3123,"children":3124},{"style":236},[3125],{"type":89,"value":3126}," next",{"type":83,"tag":117,"props":3128,"children":3129},{"style":186},[3130],{"type":89,"value":863},{"type":83,"tag":117,"props":3132,"children":3133},{"style":215},[3134],{"type":89,"value":259},{"type":83,"tag":117,"props":3136,"children":3137},{"style":186},[3138],{"type":89,"value":344},{"type":83,"tag":117,"props":3140,"children":3141},{"class":119,"line":441},[3142,3147,3152,3156,3161,3166,3170,3174],{"type":83,"tag":117,"props":3143,"children":3144},{"style":215},[3145],{"type":89,"value":3146},"      const",{"type":83,"tag":117,"props":3148,"children":3149},{"style":175},[3150],{"type":89,"value":3151}," ws",{"type":83,"tag":117,"props":3153,"children":3154},{"style":186},[3155],{"type":89,"value":400},{"type":83,"tag":117,"props":3157,"children":3158},{"style":186},[3159],{"type":89,"value":3160}," new",{"type":83,"tag":117,"props":3162,"children":3163},{"style":262},[3164],{"type":89,"value":3165}," WebSocket",{"type":83,"tag":117,"props":3167,"children":3168},{"style":408},[3169],{"type":89,"value":285},{"type":83,"tag":117,"props":3171,"children":3172},{"style":175},[3173],{"type":89,"value":652},{"type":83,"tag":117,"props":3175,"children":3176},{"style":408},[3177],{"type":89,"value":438},{"type":83,"tag":117,"props":3179,"children":3180},{"class":119,"line":449},[3181,3186,3190,3195,3199,3203,3208,3212,3216,3220,3224,3229,3233,3237,3242,3246,3250,3254,3258],{"type":83,"tag":117,"props":3182,"children":3183},{"style":175},[3184],{"type":89,"value":3185},"      ws",{"type":83,"tag":117,"props":3187,"children":3188},{"style":186},[3189],{"type":89,"value":275},{"type":83,"tag":117,"props":3191,"children":3192},{"style":262},[3193],{"type":89,"value":3194},"onmessage",{"type":83,"tag":117,"props":3196,"children":3197},{"style":186},[3198],{"type":89,"value":400},{"type":83,"tag":117,"props":3200,"children":3201},{"style":186},[3202],{"type":89,"value":233},{"type":83,"tag":117,"props":3204,"children":3205},{"style":236},[3206],{"type":89,"value":3207},"event",{"type":83,"tag":117,"props":3209,"children":3210},{"style":186},[3211],{"type":89,"value":254},{"type":83,"tag":117,"props":3213,"children":3214},{"style":215},[3215],{"type":89,"value":259},{"type":83,"tag":117,"props":3217,"children":3218},{"style":262},[3219],{"type":89,"value":3126},{"type":83,"tag":117,"props":3221,"children":3222},{"style":408},[3223],{"type":89,"value":285},{"type":83,"tag":117,"props":3225,"children":3226},{"style":186},[3227],{"type":89,"value":3228},"null,",{"type":83,"tag":117,"props":3230,"children":3231},{"style":175},[3232],{"type":89,"value":934},{"type":83,"tag":117,"props":3234,"children":3235},{"style":186},[3236],{"type":89,"value":275},{"type":83,"tag":117,"props":3238,"children":3239},{"style":262},[3240],{"type":89,"value":3241},"parse",{"type":83,"tag":117,"props":3243,"children":3244},{"style":408},[3245],{"type":89,"value":285},{"type":83,"tag":117,"props":3247,"children":3248},{"style":175},[3249],{"type":89,"value":3207},{"type":83,"tag":117,"props":3251,"children":3252},{"style":186},[3253],{"type":89,"value":275},{"type":83,"tag":117,"props":3255,"children":3256},{"style":175},[3257],{"type":89,"value":598},{"type":83,"tag":117,"props":3259,"children":3260},{"style":408},[3261],{"type":89,"value":3262},"))\n",{"type":83,"tag":117,"props":3264,"children":3265},{"class":119,"line":511},[3266,3270,3274,3279,3283,3287,3291,3295,3299,3303,3307,3311],{"type":83,"tag":117,"props":3267,"children":3268},{"style":175},[3269],{"type":89,"value":3185},{"type":83,"tag":117,"props":3271,"children":3272},{"style":186},[3273],{"type":89,"value":275},{"type":83,"tag":117,"props":3275,"children":3276},{"style":262},[3277],{"type":89,"value":3278},"onerror",{"type":83,"tag":117,"props":3280,"children":3281},{"style":186},[3282],{"type":89,"value":400},{"type":83,"tag":117,"props":3284,"children":3285},{"style":186},[3286],{"type":89,"value":233},{"type":83,"tag":117,"props":3288,"children":3289},{"style":236},[3290],{"type":89,"value":3207},{"type":83,"tag":117,"props":3292,"children":3293},{"style":186},[3294],{"type":89,"value":254},{"type":83,"tag":117,"props":3296,"children":3297},{"style":215},[3298],{"type":89,"value":259},{"type":83,"tag":117,"props":3300,"children":3301},{"style":262},[3302],{"type":89,"value":3126},{"type":83,"tag":117,"props":3304,"children":3305},{"style":408},[3306],{"type":89,"value":285},{"type":83,"tag":117,"props":3308,"children":3309},{"style":175},[3310],{"type":89,"value":3207},{"type":83,"tag":117,"props":3312,"children":3313},{"style":408},[3314],{"type":89,"value":438},{"type":83,"tag":117,"props":3316,"children":3317},{"class":119,"line":565},[3318,3323,3328,3332,3336,3340,3345],{"type":83,"tag":117,"props":3319,"children":3320},{"style":169},[3321],{"type":89,"value":3322},"      return",{"type":83,"tag":117,"props":3324,"children":3325},{"style":186},[3326],{"type":89,"value":3327}," ()",{"type":83,"tag":117,"props":3329,"children":3330},{"style":215},[3331],{"type":89,"value":259},{"type":83,"tag":117,"props":3333,"children":3334},{"style":175},[3335],{"type":89,"value":3151},{"type":83,"tag":117,"props":3337,"children":3338},{"style":186},[3339],{"type":89,"value":275},{"type":83,"tag":117,"props":3341,"children":3342},{"style":262},[3343],{"type":89,"value":3344},"close",{"type":83,"tag":117,"props":3346,"children":3347},{"style":408},[3348],{"type":89,"value":3349},"()\n",{"type":83,"tag":117,"props":3351,"children":3352},{"class":119,"line":623},[3353],{"type":83,"tag":117,"props":3354,"children":3355},{"style":186},[3356],{"type":89,"value":3357},"    }\n",{"type":83,"tag":117,"props":3359,"children":3360},{"class":119,"line":1215},[3361],{"type":83,"tag":117,"props":3362,"children":3363},{"style":408},[3364],{"type":89,"value":1247},{"type":83,"tag":117,"props":3366,"children":3367},{"class":119,"line":1224},[3368],{"type":83,"tag":117,"props":3369,"children":3370},{"emptyLinePlaceholder":205},[3371],{"type":89,"value":208},{"type":83,"tag":117,"props":3373,"children":3374},{"class":119,"line":1241},[3375,3379,3383,3387,3392,3396,3401,3406,3410,3414],{"type":83,"tag":117,"props":3376,"children":3377},{"style":169},[3378],{"type":89,"value":571},{"type":83,"tag":117,"props":3380,"children":3381},{"style":186},[3382],{"type":89,"value":479},{"type":83,"tag":117,"props":3384,"children":3385},{"style":408},[3386],{"type":89,"value":117},{"type":83,"tag":117,"props":3388,"children":3389},{"style":186},[3390],{"type":89,"value":3391},">{",{"type":83,"tag":117,"props":3393,"children":3394},{"style":175},[3395],{"type":89,"value":598},{"type":83,"tag":117,"props":3397,"children":3398},{"style":186},[3399],{"type":89,"value":3400},"?.",{"type":83,"tag":117,"props":3402,"children":3403},{"style":175},[3404],{"type":89,"value":3405},"price",{"type":83,"tag":117,"props":3407,"children":3408},{"style":186},[3409],{"type":89,"value":612},{"type":83,"tag":117,"props":3411,"children":3412},{"style":408},[3413],{"type":89,"value":117},{"type":83,"tag":117,"props":3415,"children":3416},{"style":186},[3417],{"type":89,"value":508},{"type":83,"tag":117,"props":3419,"children":3420},{"class":119,"line":1250},[3421],{"type":83,"tag":117,"props":3422,"children":3423},{"style":186},[3424],{"type":89,"value":629},{"type":83,"tag":92,"props":3426,"children":3427},{},[3428,3430,3436,3438,3444],{"type":89,"value":3429},"The ",{"type":83,"tag":113,"props":3431,"children":3433},{"className":3432},[],[3434],{"type":89,"value":3435},"subscribe",{"type":89,"value":3437}," function receives a ",{"type":83,"tag":113,"props":3439,"children":3441},{"className":3440},[],[3442],{"type":89,"value":3443},"next(error, data)",{"type":89,"value":3445}," callback and must return a cleanup function. Multiple components using the same key share a single subscription.",{"type":83,"tag":98,"props":3447,"children":3449},{"id":3448},"key-rules",[3450],{"type":89,"value":3451},"Key Rules",{"type":83,"tag":640,"props":3453,"children":3454},{},[3455,3472,3487,3501,3519],{"type":83,"tag":644,"props":3456,"children":3457},{},[3458,3463,3465,3470],{"type":83,"tag":634,"props":3459,"children":3460},{},[3461],{"type":89,"value":3462},"Keys must be unique",{"type":89,"value":3464}," — two ",{"type":83,"tag":113,"props":3466,"children":3468},{"className":3467},[],[3469],{"type":89,"value":154},{"type":89,"value":3471}," calls with the same key share cache and deduplicate requests",{"type":83,"tag":644,"props":3473,"children":3474},{},[3475,3480,3482],{"type":83,"tag":634,"props":3476,"children":3477},{},[3478],{"type":89,"value":3479},"Fetcher is optional",{"type":89,"value":3481}," when set via ",{"type":83,"tag":113,"props":3483,"children":3485},{"className":3484},[],[3486],{"type":89,"value":1864},{"type":83,"tag":644,"props":3488,"children":3489},{},[3490,3499],{"type":83,"tag":634,"props":3491,"children":3492},{},[3493],{"type":83,"tag":113,"props":3494,"children":3496},{"className":3495},[],[3497],{"type":89,"value":3498},"mutate(key)",{"type":89,"value":3500}," globally revalidates any hook matching that key",{"type":83,"tag":644,"props":3502,"children":3503},{},[3504,3509,3511,3517],{"type":83,"tag":634,"props":3505,"children":3506},{},[3507],{"type":89,"value":3508},"Array keys",{"type":89,"value":3510}," like ",{"type":83,"tag":113,"props":3512,"children":3514},{"className":3513},[],[3515],{"type":89,"value":3516},"useSWR(['\u002Fapi\u002Fuser', id], fetcher)",{"type":89,"value":3518}," — the fetcher receives the full array",{"type":83,"tag":644,"props":3520,"children":3521},{},[3522,3527,3529,3534],{"type":83,"tag":634,"props":3523,"children":3524},{},[3525],{"type":89,"value":3526},"Never call hooks conditionally",{"type":89,"value":3528}," — use conditional keys (",{"type":83,"tag":113,"props":3530,"children":3532},{"className":3531},[],[3533],{"type":89,"value":2563},{"type":89,"value":3535},") instead",{"type":83,"tag":3537,"props":3538,"children":3539},"style",{},[3540],{"type":89,"value":3541},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3543,"total":3659},[3544,3563,3579,3591,3611,3629,3647],{"slug":3545,"name":3545,"fn":3546,"description":3547,"org":3548,"tags":3549,"stars":27,"repoUrl":28,"updatedAt":3562},"accessibility-and-inclusive-visualization","make data visualizations accessible","Make data visualizations accessible and inclusive. Use when the user needs chart or diagram accessibility guidance, text alternatives for complex visuals, color and contrast review, keyboard support, reduced-motion behavior for animation or parallax, or an accessibility QA workflow for exported figures, UML-like diagrams, and dashboards.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3550,3553,3556,3559],{"name":3551,"slug":3552,"type":15},"Accessibility","accessibility",{"name":3554,"slug":3555,"type":15},"Charts","charts",{"name":3557,"slug":3558,"type":15},"Data Visualization","data-visualization",{"name":3560,"slug":3561,"type":15},"Design","design","2026-06-30T19:00:57.102",{"slug":3564,"name":3564,"fn":3565,"description":3566,"org":3567,"tags":3568,"stars":27,"repoUrl":28,"updatedAt":3578},"agent-browser","automate browser interactions for agents","Browser automation CLI for AI agents. Use when the user needs to interact with websites, verify dev server output, test web apps, navigate pages, fill forms, click buttons, take screenshots, extract data, or automate any browser task. Also triggers when a dev server starts so you can verify it visually.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3569,3572,3575],{"name":3570,"slug":3571,"type":15},"Agents","agents",{"name":3573,"slug":3574,"type":15},"Browser Automation","browser-automation",{"name":3576,"slug":3577,"type":15},"Testing","testing","2026-04-06T18:41:03.44016",{"slug":3580,"name":3580,"fn":3581,"description":3582,"org":3583,"tags":3584,"stars":27,"repoUrl":28,"updatedAt":3590},"agent-browser-verify","verify dev server output with automated browser","Automated browser verification for dev servers. Triggers when a dev server starts to run a visual gut-check with agent-browser — verifies the page loads, checks for console errors, validates key UI elements, and reports pass\u002Ffail before continuing.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3585,3586,3589],{"name":3573,"slug":3574,"type":15},{"name":3587,"slug":3588,"type":15},"Local Development","local-development",{"name":3576,"slug":3577,"type":15},"2026-04-06T18:41:17.526867",{"slug":3592,"name":3592,"fn":3593,"description":3594,"org":3595,"tags":3596,"stars":27,"repoUrl":28,"updatedAt":3610},"agents-sdk","build AI agents on Cloudflare Workers","Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3597,3598,3601,3604,3607],{"name":3570,"slug":3571,"type":15},{"name":3599,"slug":3600,"type":15},"Cloudflare Workers","cloudflare-workers",{"name":3602,"slug":3603,"type":15},"SDK","sdk",{"name":3605,"slug":3606,"type":15},"Serverless","serverless",{"name":3608,"slug":3609,"type":15},"WebSockets","websockets","2026-04-06T18:39:51.717063",{"slug":3612,"name":3612,"fn":3613,"description":3614,"org":3615,"tags":3616,"stars":27,"repoUrl":28,"updatedAt":3628},"ai-elements","build chat UIs with AI Elements","AI Elements component library guidance — pre-built React components for AI interfaces built on shadcn\u002Fui. Use when building chat UIs, message displays, tool call rendering, streaming responses, reasoning panels, or any AI-native interface with the AI SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3617,3618,3619,3622,3625],{"name":23,"slug":24,"type":15},{"name":17,"slug":18,"type":15},{"name":3620,"slug":3621,"type":15},"shadcn\u002Fui","shadcn-ui",{"name":3623,"slug":3624,"type":15},"UI Components","ui-components",{"name":3626,"slug":3627,"type":15},"Vercel","vercel","2026-04-06T18:40:59.619419",{"slug":3630,"name":3630,"fn":3631,"description":3632,"org":3633,"tags":3634,"stars":27,"repoUrl":28,"updatedAt":3646},"ai-gateway","configure Vercel AI Gateway","Vercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3635,3638,3641,3644,3645],{"name":3636,"slug":3637,"type":15},"AI Infrastructure","ai-infrastructure",{"name":3639,"slug":3640,"type":15},"Cost Optimization","cost-optimization",{"name":3642,"slug":3643,"type":15},"LLM","llm",{"name":13,"slug":14,"type":15},{"name":3626,"slug":3627,"type":15},"2026-04-06T18:40:44.377464",{"slug":3648,"name":3648,"fn":3649,"description":3650,"org":3651,"tags":3652,"stars":27,"repoUrl":28,"updatedAt":3658},"ai-generation-persistence","implement persistence patterns for AI generations","AI generation persistence patterns — unique IDs, addressable URLs, database storage, and cost tracking for every LLM generation",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3653,3654,3657],{"name":3639,"slug":3640,"type":15},{"name":3655,"slug":3656,"type":15},"Database","database",{"name":3642,"slug":3643,"type":15},"2026-04-06T18:41:08.513425",600,{"items":3661,"total":3857},[3662,3683,3706,3723,3739,3756,3774,3786,3800,3814,3826,3841],{"slug":3663,"name":3663,"fn":3664,"description":3665,"org":3666,"tags":3667,"stars":3680,"repoUrl":3681,"updatedAt":3682},"prior-auth-packet-builder","build healthcare prior authorization packets","Build a concise prior authorization packet from local case files and payer policy docs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3668,3671,3674,3677],{"name":3669,"slug":3670,"type":15},"Documents","documents",{"name":3672,"slug":3673,"type":15},"Healthcare","healthcare",{"name":3675,"slug":3676,"type":15},"Insurance","insurance",{"name":3678,"slug":3679,"type":15},"Regulatory Compliance","regulatory-compliance",28169,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-python","2026-04-16T05:11:39.180399",{"slug":3684,"name":3684,"fn":3685,"description":3686,"org":3687,"tags":3688,"stars":3703,"repoUrl":3704,"updatedAt":3705},"aspnet-core","build ASP.NET Core web applications","Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development. Use when working on Blazor Web Apps, Razor Pages, MVC, Minimal APIs, controller-based Web APIs, SignalR, gRPC, middleware, dependency injection, configuration, authentication, authorization, testing, performance, deployment, or ASP.NET Core upgrades.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3689,3692,3694,3697,3700],{"name":3690,"slug":3691,"type":15},".NET","dotnet",{"name":3693,"slug":3684,"type":15},"ASP.NET Core",{"name":3695,"slug":3696,"type":15},"Blazor","blazor",{"name":3698,"slug":3699,"type":15},"C#","csharp",{"name":3701,"slug":3702,"type":15},"Web Development","web-development",23787,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fskills","2026-04-12T05:07:02.819491",{"slug":3707,"name":3707,"fn":3708,"description":3709,"org":3710,"tags":3711,"stars":3703,"repoUrl":3704,"updatedAt":3722},"chatgpt-apps","build ChatGPT Apps SDK applications","Build, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, register UI resources, wire the MCP Apps bridge or ChatGPT compatibility APIs, apply Apps SDK metadata or CSP or domain settings, or produce a docs-aligned project scaffold. Prefer a docs-first workflow by invoking the openai-docs skill or OpenAI developer docs MCP tools before generating code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3712,3715,3718,3721],{"name":3713,"slug":3714,"type":15},"Apps SDK","apps-sdk",{"name":3716,"slug":3717,"type":15},"ChatGPT","chatgpt",{"name":3719,"slug":3720,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},"2026-04-12T05:07:05.468097",{"slug":3724,"name":3724,"fn":3725,"description":3726,"org":3727,"tags":3728,"stars":3703,"repoUrl":3704,"updatedAt":3738},"cli-creator","build CLIs from API docs","Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script. Use when the user wants Codex to create a command-line tool that can run from any repo, expose composable read\u002Fwrite commands, return stable JSON, manage auth, and pair with a companion skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3729,3732,3735],{"name":3730,"slug":3731,"type":15},"API Development","api-development",{"name":3733,"slug":3734,"type":15},"CLI","cli",{"name":3736,"slug":3737,"type":15},"Codex","codex","2026-04-12T05:07:04.132762",{"slug":3740,"name":3740,"fn":3741,"description":3742,"org":3743,"tags":3744,"stars":3703,"repoUrl":3704,"updatedAt":3755},"cloudflare-deploy","deploy projects to Cloudflare","Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3745,3748,3751,3752],{"name":3746,"slug":3747,"type":15},"Cloudflare","cloudflare",{"name":3749,"slug":3750,"type":15},"Cloudflare Pages","cloudflare-pages",{"name":3599,"slug":3600,"type":15},{"name":3753,"slug":3754,"type":15},"Deployment","deployment","2026-04-12T05:07:14.275118",{"slug":3757,"name":3757,"fn":3758,"description":3759,"org":3760,"tags":3761,"stars":3703,"repoUrl":3704,"updatedAt":3773},"define-goal","define and set measurable project goals","Help the user define a concrete, measurable goal before starting work, especially when they ask to use the goal tool, create a goal, set an objective, clarify success criteria, or turn a fuzzy intention into a quantitative outcome. Use this skill for goal creation and goal refinement only; it does not manage durable snapshots, decision logs, or long-running execution artifacts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3762,3765,3768,3770],{"name":3763,"slug":3764,"type":15},"Productivity","productivity",{"name":3766,"slug":3767,"type":15},"Project Management","project-management",{"name":2176,"slug":3769,"type":15},"strategy",{"name":3771,"slug":3772,"type":15},"Task Management","task-management","2026-05-23T06:17:16.870838",{"slug":3775,"name":3775,"fn":3776,"description":3777,"org":3778,"tags":3779,"stars":3703,"repoUrl":3704,"updatedAt":3785},"figma","translate Figma designs into code","Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3780,3781,3783,3784],{"name":3560,"slug":3561,"type":15},{"name":3782,"slug":3775,"type":15},"Figma",{"name":23,"slug":24,"type":15},{"name":3719,"slug":3720,"type":15},"2026-04-12T05:06:47.939943",{"slug":3787,"name":3787,"fn":3788,"description":3789,"org":3790,"tags":3791,"stars":3703,"repoUrl":3704,"updatedAt":3799},"figma-code-connect-components","connect Figma designs to code components","Connects Figma design components to code components using Code Connect mapping tools. Use when user says \"code connect\", \"connect this component to code\", \"map this component\", \"link component to code\", \"create code connect mapping\", or wants to establish mappings between Figma designs and code implementations. For canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3792,3793,3796,3797,3798],{"name":3560,"slug":3561,"type":15},{"name":3794,"slug":3795,"type":15},"Design System","design-system",{"name":3782,"slug":3775,"type":15},{"name":23,"slug":24,"type":15},{"name":3623,"slug":3624,"type":15},"2026-05-10T05:59:52.971881",{"slug":3801,"name":3801,"fn":3802,"description":3803,"org":3804,"tags":3805,"stars":3703,"repoUrl":3704,"updatedAt":3813},"figma-create-design-system-rules","generate design system rules from Figma","Generates custom design system rules for the user's codebase. Use when user says \"create design system rules\", \"generate rules for my project\", \"set up design rules\", \"customize design system guidelines\", or wants to establish project-specific conventions for Figma-to-code workflows. Requires Figma MCP server connection.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3806,3807,3808,3811,3812],{"name":3560,"slug":3561,"type":15},{"name":3794,"slug":3795,"type":15},{"name":3809,"slug":3810,"type":15},"Documentation","documentation",{"name":3782,"slug":3775,"type":15},{"name":23,"slug":24,"type":15},"2026-05-16T06:07:47.821474",{"slug":3815,"name":3815,"fn":3816,"description":3817,"org":3818,"tags":3819,"stars":3703,"repoUrl":3704,"updatedAt":3825},"figma-implement-design","translate Figma designs into application code","Translates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions \"implement design\", \"generate code\", \"implement component\", provides Figma URLs, or asks to build components matching Figma specs. For Figma canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3820,3821,3822,3823,3824],{"name":3560,"slug":3561,"type":15},{"name":3782,"slug":3775,"type":15},{"name":23,"slug":24,"type":15},{"name":3623,"slug":3624,"type":15},{"name":3701,"slug":3702,"type":15},"2026-05-16T06:07:40.583615",{"slug":3827,"name":3827,"fn":3828,"description":3829,"org":3830,"tags":3831,"stars":3703,"repoUrl":3704,"updatedAt":3840},"hatch-pet","create animated pets for Codex","Create, repair, validate, visually QA, and package Codex-compatible animated pets and pet spritesheets from character art, generated images, company or prospect brand cues, or visual references. Use when a user wants a lightweight-worker Codex pet workflow, a non-pixel custom pet style, a prospect or company mascot pet, or a full 8x9 animated pet atlas with transparent unused cells, QA contact sheets, and pet.json packaging. This skill composes the installed $imagegen system skill for visual generation and uses bundled scripts for deterministic spritesheet assembly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3832,3835,3836,3839],{"name":3833,"slug":3834,"type":15},"Animation","animation",{"name":3736,"slug":3737,"type":15},{"name":3837,"slug":3838,"type":15},"Creative","creative",{"name":3560,"slug":3561,"type":15},"2026-05-02T05:31:48.48485",{"slug":3842,"name":3842,"fn":3843,"description":3844,"org":3845,"tags":3846,"stars":3703,"repoUrl":3704,"updatedAt":3856},"imagegen","generate and edit raster images","Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3847,3848,3849,3852,3855],{"name":3837,"slug":3838,"type":15},{"name":3560,"slug":3561,"type":15},{"name":3850,"slug":3851,"type":15},"Image Generation","image-generation",{"name":3853,"slug":3854,"type":15},"Images","images",{"name":9,"slug":8,"type":15},"2026-05-15T06:23:24.312127",675]