[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-tanstack-server-functions":3,"mdc--havmr1-key":48,"related-repo-tanstack-server-functions":9778,"related-org-tanstack-server-functions":9883},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":43,"sourceUrl":46,"mdContent":47},"server-functions","create and manage server functions","createServerFn (GET\u002FPOST), validator (Zod or function), useServerFn hook, server context utilities (getRequest, getRequestHeader, setResponseHeader, setResponseStatus), error handling (throw errors, redirect, notFound), streaming, FormData handling, file organization (.functions.ts, .server.ts).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"tanstack","TanStack","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftanstack.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Backend","backend","tag",{"name":17,"slug":18,"type":15},"TypeScript","typescript",{"name":20,"slug":21,"type":15},"API Development","api-development",{"name":9,"slug":8,"type":15},14787,"https:\u002F\u002Fgithub.com\u002FTanStack\u002Frouter","2026-07-30T05:27:17.511743",null,1761,[29,30,31,32,33,34,35,36,37,38,4,39,40,41,18,42],"framework","fullstack","javascript","react","route","router","routing","rpc","search","searchparams","ssr","state-management","typesafe","url",{"repoUrl":24,"stars":23,"forks":27,"topics":44,"description":45},[29,30,31,32,33,34,35,36,37,38,4,39,40,41,18,42],"🤖 A client-first, server-capable, fully type-safe router and full-stack framework for the web (React and more).","https:\u002F\u002Fgithub.com\u002FTanStack\u002Frouter\u002Ftree\u002FHEAD\u002Fpackages\u002Fstart-client-core\u002Fskills\u002Fstart-core\u002Fserver-functions","---\nname: server-functions\ndescription: >-\n  createServerFn (GET\u002FPOST), validator (Zod or function),\n  useServerFn hook, server context utilities (getRequest,\n  getRequestHeader, setResponseHeader, setResponseStatus), error\n  handling (throw errors, redirect, notFound), streaming, FormData\n  handling, file organization (.functions.ts, .server.ts).\nmetadata:\n  type: sub-skill\n  library: tanstack-start\n  library_version: '1.170.14'\nrequires:\n  - start-core\nsources:\n  - TanStack\u002Frouter:docs\u002Fstart\u002Fframework\u002Freact\u002Fguide\u002Fserver-functions.md\n---\n\n# Server Functions\n\nServer functions are type-safe RPCs created with `createServerFn`. They run exclusively on the server but can be called from anywhere — loaders, components, hooks, event handlers, or other server functions.\n\n> **CRITICAL**: Server functions are API endpoints. They are reachable independently of whichever route renders the calling UI. **Auth must be enforced inside the handler (or via middleware) for any server function that touches private data.** Route `beforeLoad` is UX, not the data boundary. See [start-core\u002Fauth-server-primitives](..\u002Fauth-server-primitives\u002FSKILL.md) for the session\u002Fmiddleware pattern.\n> **CRITICAL**: Loaders are ISOMORPHIC — they run on BOTH client and server. Database queries, file system access, and secret API keys MUST go inside `createServerFn`, NOT in loaders directly.\n> **CRITICAL**: Do not use `\"use server\"` directives, `getServerSideProps`, or any Next.js\u002FRemix server patterns. TanStack Start uses `createServerFn` exclusively.\n\n## Basic Usage\n\n```tsx\nimport { createServerFn } from '@tanstack\u002Freact-start'\n\n\u002F\u002F GET (default)\nconst getData = createServerFn().handler(async () => {\n  return { message: 'Hello from server!' }\n})\n\n\u002F\u002F POST\nconst saveData = createServerFn({ method: 'POST' }).handler(async () => {\n  return { success: true }\n})\n```\n\n## Calling from Loaders\n\n```tsx\nimport { createFileRoute } from '@tanstack\u002Freact-router'\nimport { createServerFn } from '@tanstack\u002Freact-start'\n\nconst getPosts = createServerFn({ method: 'GET' }).handler(async () => {\n  const posts = await db.query('SELECT * FROM posts')\n  return { posts }\n})\n\nexport const Route = createFileRoute('\u002Fposts')({\n  loader: () => getPosts(),\n  component: PostList,\n})\n\nfunction PostList() {\n  const { posts } = Route.useLoaderData()\n  return (\n    \u003Cul>\n      {posts.map((p) => (\n        \u003Cli key={p.id}>{p.title}\u003C\u002Fli>\n      ))}\n    \u003C\u002Ful>\n  )\n}\n```\n\n## Calling from Components\n\nUse the `useServerFn` hook to call server functions from event handlers:\n\n```tsx\nimport { useServerFn } from '@tanstack\u002Freact-start'\n\nconst deletePost = createServerFn({ method: 'POST' })\n  .validator((data: { id: string }) => data)\n  .handler(async ({ data }) => {\n    await db.delete('posts').where({ id: data.id })\n    return { success: true }\n  })\n\nfunction DeleteButton({ postId }: { postId: string }) {\n  const deletePostFn = useServerFn(deletePost)\n\n  return (\n    \u003Cbutton onClick={() => deletePostFn({ data: { id: postId } })}>\n      Delete\n    \u003C\u002Fbutton>\n  )\n}\n```\n\n## Cache-Coherent Mutations\n\nKeep reads and writes behind server functions that use the same authoritative store. Await the write, then invalidate the route cache so its loader reads the persisted result:\n\n```tsx\nconst listIssues = createServerFn({ method: 'GET' }).handler(() => {\n  return db.issues.findMany()\n})\n\nconst createIssue = createServerFn({ method: 'POST' })\n  .validator((data: unknown) => {\n    if (\n      typeof data !== 'object' ||\n      data === null ||\n      !('title' in data) ||\n      typeof data.title !== 'string' ||\n      data.title.trim().length === 0\n    ) {\n      throw new Error('Title is required')\n    }\n    return { title: data.title.trim() }\n  })\n  .handler(async ({ data }) => {\n    return db.issues.create({ data })\n  })\n\nexport const Route = createFileRoute('\u002Fissues')({\n  loader: () => listIssues(),\n  component: IssuesPage,\n})\n\nfunction IssuesPage() {\n  const router = useRouter()\n  const createIssueFn = useServerFn(createIssue)\n\n  const handleCreate = async (title: string) => {\n    await createIssueFn({ data: { title } })\n    await router.invalidate({ sync: true })\n  }\n\n  \u002F\u002F render Route.useLoaderData() and call handleCreate from the form\n}\n```\n\nDo not update only local component state after a persistent mutation. Verify the rendered list after create, update, delete, and a fresh page load.\n\n## Input Validation\n\n### Basic Validator\n\n```tsx\nconst greetUser = createServerFn({ method: 'GET' })\n  .validator((data: { name: string }) => data)\n  .handler(async ({ data }) => {\n    return `Hello, ${data.name}!`\n  })\n\nawait greetUser({ data: { name: 'John' } })\n```\n\n### Zod Validator\n\n```tsx\nimport { z } from 'zod'\n\nconst createUser = createServerFn({ method: 'POST' })\n  .validator(\n    z.object({\n      name: z.string().min(1),\n      age: z.number().min(0),\n    }),\n  )\n  .handler(async ({ data }) => {\n    return `Created user: ${data.name}, age ${data.age}`\n  })\n```\n\nInput validation does not validate output serialization. When a response schema changes, update the database selection, service return value, server-function result, loader consumer, and UI. Add a runtime test that calls the handler or HTTP boundary and asserts the new field in the returned payload.\n\n### FormData\n\n```tsx\nconst submitForm = createServerFn({ method: 'POST' })\n  .validator((data) => {\n    if (!(data instanceof FormData)) {\n      throw new Error('Expected FormData')\n    }\n    return {\n      name: data.get('name')?.toString() || '',\n      email: data.get('email')?.toString() || '',\n    }\n  })\n  .handler(async ({ data }) => {\n    return { success: true }\n  })\n```\n\n## Error Handling\n\n### Errors\n\n```tsx\nconst riskyFunction = createServerFn().handler(async () => {\n  throw new Error('Something went wrong!')\n})\n\ntry {\n  await riskyFunction()\n} catch (error) {\n  console.log(error.message) \u002F\u002F \"Something went wrong!\"\n}\n```\n\n### Redirects\n\n```tsx\nimport { redirect } from '@tanstack\u002Freact-router'\n\nconst requireAuth = createServerFn().handler(async () => {\n  const user = await getCurrentUser()\n  if (!user) {\n    throw redirect({ to: '\u002Flogin' })\n  }\n  return user\n})\n```\n\n### Not Found\n\n```tsx\nimport { notFound } from '@tanstack\u002Freact-router'\n\nconst getPost = createServerFn()\n  .validator((data: { id: string }) => data)\n  .handler(async ({ data }) => {\n    const post = await db.findPost(data.id)\n    if (!post) {\n      throw notFound()\n    }\n    return post\n  })\n```\n\n## Server Context Utilities\n\nAccess request\u002Fresponse details inside server function handlers:\n\n```tsx\nimport { createServerFn } from '@tanstack\u002Freact-start'\nimport {\n  getRequest,\n  getRequestHeader,\n  setResponseHeaders,\n  setResponseStatus,\n} from '@tanstack\u002Freact-start\u002Fserver'\n\n\u002F\u002F Public, non-personalized data — safe to cache shared across users.\nconst getPublicData = createServerFn({ method: 'GET' }).handler(async () => {\n  setResponseHeaders({\n    \u002F\u002F 'public' is correct ONLY when the response does not depend on identity.\n    \u002F\u002F For anything tied to a session\u002Fuser\u002Ftenant, use 'private' or 'no-store'.\n    'Cache-Control': 'public, max-age=300',\n  })\n  setResponseStatus(200)\n  return fetchPublicData()\n})\n\n\u002F\u002F Authenticated data — must NOT be 'public'.\nconst getMyData = createServerFn({ method: 'GET' }).handler(async () => {\n  const authHeader = getRequestHeader('Authorization')\n  \u002F\u002F ... auth check ...\n\n  setResponseHeaders({\n    \u002F\u002F 'private' = only the user-agent may cache. Vary by Cookie\u002FAuthorization\n    \u002F\u002F so any intermediary that does cache keys by identity, not URL alone.\n    'Cache-Control': 'private, max-age=60',\n    Vary: 'Cookie, Authorization',\n  })\n  return fetchPersonalizedData()\n})\n```\n\nAvailable utilities:\n\n- `getRequest()` — full Request object\n- `getRequestHeader(name)` — single request header\n- `setResponseHeader(name, value)` — single response header\n- `setResponseHeaders(headers)` — multiple response headers\n- `setResponseStatus(code)` — HTTP status code\n\n## File Organization\n\n```text\nsrc\u002Futils\u002F\n├── users.functions.ts   # createServerFn wrappers (safe to import anywhere)\n├── users.server.ts      # Server-only helpers (DB queries, internal logic)\n└── schemas.ts           # Shared validation schemas (client-safe)\n```\n\n```tsx\n\u002F\u002F users.server.ts — server-only helpers\nimport { db } from '~\u002Fdb'\n\nexport async function findUserById(id: string) {\n  return db.query.users.findFirst({ where: eq(users.id, id) })\n}\n```\n\n```tsx\n\u002F\u002F users.functions.ts — server functions\nimport { createServerFn } from '@tanstack\u002Freact-start'\nimport { findUserById } from '.\u002Fusers.server'\n\nexport const getUser = createServerFn({ method: 'GET' })\n  .validator((data: { id: string }) => data)\n  .handler(async ({ data }) => {\n    return findUserById(data.id)\n  })\n```\n\nStatic imports of server functions are safe — the build replaces implementations with RPC stubs in client bundles.\n\n## Common Mistakes\n\n### 1. CRITICAL: Relying on a route guard to protect a server function\n\nA `beforeLoad` redirect protects the **route's UI**, not the **data endpoint**. `createServerFn` exposes a callable endpoint that an attacker can hit directly — no need to load the route at all. Auth on the endpoint is the security boundary; auth on the route is UX.\n\n```tsx\n\u002F\u002F WRONG — the route guard doesn't reach the handler\nconst getMyOrders = createServerFn({ method: 'GET' }).handler(async () => {\n  return db.orders.findMany() \u002F\u002F ← anyone can call the RPC\n})\nexport const Route = createFileRoute('\u002F_authenticated\u002Forders')({\n  beforeLoad: ({ context }) => {\n    if (!context.auth.isAuthenticated) throw redirect({ to: '\u002Flogin' })\n  },\n  loader: () => getMyOrders(),\n})\n\n\u002F\u002F CORRECT — auth enforced on the handler itself\nconst getMyOrders = createServerFn({ method: 'GET' })\n  .middleware([authMiddleware])\n  .handler(async ({ context }) => {\n    return db.orders.findMany({ where: { userId: context.session.userId } })\n  })\n```\n\nApply `authMiddleware` (or an equivalent in-handler check) to **every** `createServerFn` that needs auth. See [start-core\u002Fauth-server-primitives](..\u002Fauth-server-primitives\u002FSKILL.md) for the full session\u002Fmiddleware pattern and [start-core\u002Fmiddleware](..\u002Fmiddleware\u002FSKILL.md) for composing the factory.\n\n### 2. CRITICAL: Putting server-only code in loaders\n\n```tsx\n\u002F\u002F WRONG — loader is ISOMORPHIC, runs on BOTH client and server\nexport const Route = createFileRoute('\u002Fposts')({\n  loader: async () => {\n    const posts = await db.query('SELECT * FROM posts')\n    return { posts }\n  },\n})\n\n\u002F\u002F CORRECT — use createServerFn for server-only logic\nconst getPosts = createServerFn({ method: 'GET' }).handler(async () => {\n  const posts = await db.query('SELECT * FROM posts')\n  return { posts }\n})\n\nexport const Route = createFileRoute('\u002Fposts')({\n  loader: () => getPosts(),\n})\n```\n\n### 3. CRITICAL: Using Next.js \u002F Remix \u002F React Router DOM patterns\n\nIf the file lives at `src\u002Fpages\u002F`, `app\u002Flayout.tsx`, `_app\u002F`, or imports anything from `react-router-dom` or `next\u002F`, it is wrong-framework code. TanStack Start uses `src\u002Froutes\u002F` + `createFileRoute` + `createServerFn`.\n\n```tsx\n\u002F\u002F WRONG — \"use server\" is a React directive, not used in TanStack Start\n'use server'\nexport async function getUser() { ... }\n\n\u002F\u002F WRONG — getServerSideProps is Next.js Pages Router\nexport async function getServerSideProps() { ... }\n\n\u002F\u002F WRONG — Next.js App Router server component data fetching\nexport default async function Page() {\n  const data = await fetch(...).then(r => r.json())\n  return \u003Cdiv>{data}\u003C\u002Fdiv>\n}\n\n\u002F\u002F WRONG — Remix\nexport async function loader({ request }) { ... }\nexport async function action({ request }) { ... }\n\n\u002F\u002F WRONG — react-router-dom (a different library)\nimport { Link, useNavigate } from 'react-router-dom'\n\n\u002F\u002F CORRECT — TanStack Start\nimport { createServerFn } from '@tanstack\u002Freact-start'\nimport { Link, useNavigate, createFileRoute } from '@tanstack\u002Freact-router'\n\nconst getUser = createServerFn({ method: 'GET' })\n  .handler(async () => { ... })\n\nexport const Route = createFileRoute('\u002Fusers\u002F$id')({\n  loader: ({ params }) => getUser({ data: { id: params.id } }),\n  component: UserPage,\n})\n```\n\nIf you see `src\u002Fpages\u002F`, `app\u002Flayout.tsx`, or `react-router-dom` in agent output, the agent is generating for the wrong framework. Build will fail or routes will conflict at runtime.\n\n### 4. HIGH: Dynamic imports for server functions\n\n```tsx\n\u002F\u002F WRONG — can cause bundler issues\nconst { getUser } = await import('~\u002Futils\u002Fusers.functions')\n\n\u002F\u002F CORRECT — static imports are safe, build handles environment shaking\nimport { getUser } from '~\u002Futils\u002Fusers.functions'\n```\n\n### 5. HIGH: Awaiting server function without calling it\n\n`createServerFn` returns a function — it must be invoked with `()`:\n\n```tsx\n\u002F\u002F WRONG — getItems is a function, not a Promise\nconst data = await getItems\n\n\u002F\u002F CORRECT — call the function\nconst data = await getItems()\n\n\u002F\u002F With validated input\nconst data = await getItems({ data: { id: '1' } })\n```\n\n### 6. CRITICAL: Caching authenticated responses with `Cache-Control: public`\n\n`Cache-Control: public, max-age=N` tells every CDN, proxy, and shared cache between you and the user that this response can be served to anyone. If the response depends on the session (user, tenant, role), the first user's response gets cached and replayed to the next user — a cross-tenant data leak.\n\n```tsx\n\u002F\u002F WRONG — auth'd response, public cache, leaks to next user via CDN\nconst getMyOrders = createServerFn({ method: 'GET' }).handler(async () => {\n  const session = await requireSession() \u002F\u002F identity-dependent\n  setResponseHeaders({ 'Cache-Control': 'public, max-age=300' })\n  return db.orders.findMany({ where: { userId: session.userId } })\n})\n\n\u002F\u002F CORRECT — private + Vary so any cache that does store it keys by identity\nconst getMyOrders = createServerFn({ method: 'GET' }).handler(async () => {\n  const session = await requireSession()\n  setResponseHeaders({\n    'Cache-Control': 'private, max-age=60',\n    Vary: 'Cookie, Authorization',\n  })\n  return db.orders.findMany({ where: { userId: session.userId } })\n})\n\n\u002F\u002F ALSO CORRECT — opt out entirely for sensitive data\nsetResponseHeaders({ 'Cache-Control': 'no-store' })\n```\n\nRule of thumb: if the handler reads a session\u002Fcookie\u002Fauth header or branches on identity, the response is **not** `public`. Default to `private` (or `no-store` for sensitive data); reach for `public` only on responses that are byte-for-byte identical regardless of who asks. See also [start-core\u002Fdeployment](..\u002Fdeployment\u002FSKILL.md) for ISR\u002FCache-Control on full pages.\n\n### 7. MEDIUM: When to wrap with `useServerFn`\n\n`useServerFn` is **required** when the server function uses `throw redirect()` or `throw notFound()` — the hook wires the throw into the router so the redirect actually navigates. For server functions that just return data (call them directly or via `useMutation`\u002F`useQuery`), the hook is optional.\n\n```tsx\n\u002F\u002F Plain data — direct call is fine (also fine to pass to useMutation\u002FuseQuery)\n\u003Cbutton onClick={() => deletePost({ data: { id } })}>Delete\u003C\u002Fbutton>\nuseMutation({ mutationFn: deletePost })\n\n\u002F\u002F Throws redirect\u002FnotFound — MUST wrap with useServerFn so the router handles the throw\nconst signupFn = useServerFn(signup) \u002F\u002F signup throws redirect on success\n\u003Cbutton onClick={() => signupFn({ data: form })}>Sign up\u003C\u002Fbutton>\n```\n\nIf in doubt: wrap with `useServerFn`. It's a no-op for plain-data functions and the safe default when a function might later add a redirect.\n\n### 8. CRITICAL: Self-fetching a relative API URL from a loader\n\n```tsx\n\u002F\u002F WRONG — this loader also runs during SSR, where a relative URL may fail\nexport const Route = createFileRoute('\u002Fissues')({\n  loader: () => fetch('\u002Fapi\u002Fissues').then((response) => response.json()),\n})\n\n\u002F\u002F CORRECT — call the server function; the client build gets an RPC stub\nexport const Route = createFileRoute('\u002Fissues')({\n  loader: () => listIssues(),\n})\n```\n\nRelative `fetch` is fine in a browser-only event handler. It is not a universal loader data strategy.\n\n## Cross-References\n\n- [start-core\u002Fexecution-model](..\u002Fexecution-model\u002FSKILL.md) — understanding where code runs\n- [start-core\u002Fmiddleware](..\u002Fmiddleware\u002FSKILL.md) — composing server functions with middleware\n- [start-core\u002Fauth-server-primitives](..\u002Fauth-server-primitives\u002FSKILL.md) — sessions, cookies, OAuth, CSRF, rate limiting (the server-side half of auth; `getCurrentUser`\u002F`useSession`-style helpers belong here, not at module scope)\n- [router-core\u002Fauth-and-guards](..\u002F..\u002F..\u002F..\u002Frouter-core\u002Fskills\u002Frouter-core\u002Fauth-and-guards\u002FSKILL.md) — routing-side UX guards; data auth belongs in the server function, server route, or API endpoint handler\u002Fmiddleware\n",{"data":49,"body":58},{"name":4,"description":6,"metadata":50,"requires":54,"sources":56},{"type":51,"library":52,"library_version":53},"sub-skill","tanstack-start","1.170.14",[55],"start-core",[57],"TanStack\u002Frouter:docs\u002Fstart\u002Fframework\u002Freact\u002Fguide\u002Fserver-functions.md",{"type":59,"children":60},"root",[61,69,84,165,172,524,530,1183,1189,1202,1764,1770,1775,2828,2833,2839,2846,3137,3143,3534,3539,3545,3975,3981,3987,4202,4208,4448,4454,4749,4755,4760,5401,5406,5464,5470,5480,5686,5975,5980,5986,5992,6025,6618,6659,6665,7117,7123,7188,8023,8048,8054,8172,8178,8194,8367,8379,8390,9034,9083,9094,9142,9405,9417,9423,9695,9708,9714,9772],{"type":62,"tag":63,"props":64,"children":65},"element","h1",{"id":4},[66],{"type":67,"value":68},"text","Server Functions",{"type":62,"tag":70,"props":71,"children":72},"p",{},[73,75,82],{"type":67,"value":74},"Server functions are type-safe RPCs created with ",{"type":62,"tag":76,"props":77,"children":79},"code",{"className":78},[],[80],{"type":67,"value":81},"createServerFn",{"type":67,"value":83},". They run exclusively on the server but can be called from anywhere — loaders, components, hooks, event handlers, or other server functions.",{"type":62,"tag":85,"props":86,"children":87},"blockquote",{},[88],{"type":62,"tag":70,"props":89,"children":90},{},[91,97,99,104,106,112,114,121,123,127,129,134,136,140,142,148,150,156,158,163],{"type":62,"tag":92,"props":93,"children":94},"strong",{},[95],{"type":67,"value":96},"CRITICAL",{"type":67,"value":98},": Server functions are API endpoints. They are reachable independently of whichever route renders the calling UI. ",{"type":62,"tag":92,"props":100,"children":101},{},[102],{"type":67,"value":103},"Auth must be enforced inside the handler (or via middleware) for any server function that touches private data.",{"type":67,"value":105}," Route ",{"type":62,"tag":76,"props":107,"children":109},{"className":108},[],[110],{"type":67,"value":111},"beforeLoad",{"type":67,"value":113}," is UX, not the data boundary. See ",{"type":62,"tag":115,"props":116,"children":118},"a",{"href":117},"..\u002Fauth-server-primitives\u002FSKILL.md",[119],{"type":67,"value":120},"start-core\u002Fauth-server-primitives",{"type":67,"value":122}," for the session\u002Fmiddleware pattern.\n",{"type":62,"tag":92,"props":124,"children":125},{},[126],{"type":67,"value":96},{"type":67,"value":128},": Loaders are ISOMORPHIC — they run on BOTH client and server. Database queries, file system access, and secret API keys MUST go inside ",{"type":62,"tag":76,"props":130,"children":132},{"className":131},[],[133],{"type":67,"value":81},{"type":67,"value":135},", NOT in loaders directly.\n",{"type":62,"tag":92,"props":137,"children":138},{},[139],{"type":67,"value":96},{"type":67,"value":141},": Do not use ",{"type":62,"tag":76,"props":143,"children":145},{"className":144},[],[146],{"type":67,"value":147},"\"use server\"",{"type":67,"value":149}," directives, ",{"type":62,"tag":76,"props":151,"children":153},{"className":152},[],[154],{"type":67,"value":155},"getServerSideProps",{"type":67,"value":157},", or any Next.js\u002FRemix server patterns. TanStack Start uses ",{"type":62,"tag":76,"props":159,"children":161},{"className":160},[],[162],{"type":67,"value":81},{"type":67,"value":164}," exclusively.",{"type":62,"tag":166,"props":167,"children":169},"h2",{"id":168},"basic-usage",[170],{"type":67,"value":171},"Basic Usage",{"type":62,"tag":173,"props":174,"children":179},"pre",{"className":175,"code":176,"language":177,"meta":178,"style":178},"language-tsx shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createServerFn } from '@tanstack\u002Freact-start'\n\n\u002F\u002F GET (default)\nconst getData = createServerFn().handler(async () => {\n  return { message: 'Hello from server!' }\n})\n\n\u002F\u002F POST\nconst saveData = createServerFn({ method: 'POST' }).handler(async () => {\n  return { success: true }\n})\n","tsx","",[180],{"type":62,"tag":76,"props":181,"children":182},{"__ignoreMap":178},[183,233,243,253,318,361,375,383,392,481,512],{"type":62,"tag":184,"props":185,"children":188},"span",{"class":186,"line":187},"line",1,[189,195,201,207,212,217,222,228],{"type":62,"tag":184,"props":190,"children":192},{"style":191},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[193],{"type":67,"value":194},"import",{"type":62,"tag":184,"props":196,"children":198},{"style":197},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[199],{"type":67,"value":200}," {",{"type":62,"tag":184,"props":202,"children":204},{"style":203},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[205],{"type":67,"value":206}," createServerFn",{"type":62,"tag":184,"props":208,"children":209},{"style":197},[210],{"type":67,"value":211}," }",{"type":62,"tag":184,"props":213,"children":214},{"style":191},[215],{"type":67,"value":216}," from",{"type":62,"tag":184,"props":218,"children":219},{"style":197},[220],{"type":67,"value":221}," '",{"type":62,"tag":184,"props":223,"children":225},{"style":224},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[226],{"type":67,"value":227},"@tanstack\u002Freact-start",{"type":62,"tag":184,"props":229,"children":230},{"style":197},[231],{"type":67,"value":232},"'\n",{"type":62,"tag":184,"props":234,"children":236},{"class":186,"line":235},2,[237],{"type":62,"tag":184,"props":238,"children":240},{"emptyLinePlaceholder":239},true,[241],{"type":67,"value":242},"\n",{"type":62,"tag":184,"props":244,"children":246},{"class":186,"line":245},3,[247],{"type":62,"tag":184,"props":248,"children":250},{"style":249},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[251],{"type":67,"value":252},"\u002F\u002F GET (default)\n",{"type":62,"tag":184,"props":254,"children":256},{"class":186,"line":255},4,[257,263,268,273,278,283,288,293,298,303,308,313],{"type":62,"tag":184,"props":258,"children":260},{"style":259},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[261],{"type":67,"value":262},"const",{"type":62,"tag":184,"props":264,"children":265},{"style":203},[266],{"type":67,"value":267}," getData ",{"type":62,"tag":184,"props":269,"children":270},{"style":197},[271],{"type":67,"value":272},"=",{"type":62,"tag":184,"props":274,"children":276},{"style":275},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[277],{"type":67,"value":206},{"type":62,"tag":184,"props":279,"children":280},{"style":203},[281],{"type":67,"value":282},"()",{"type":62,"tag":184,"props":284,"children":285},{"style":197},[286],{"type":67,"value":287},".",{"type":62,"tag":184,"props":289,"children":290},{"style":275},[291],{"type":67,"value":292},"handler",{"type":62,"tag":184,"props":294,"children":295},{"style":203},[296],{"type":67,"value":297},"(",{"type":62,"tag":184,"props":299,"children":300},{"style":259},[301],{"type":67,"value":302},"async",{"type":62,"tag":184,"props":304,"children":305},{"style":197},[306],{"type":67,"value":307}," ()",{"type":62,"tag":184,"props":309,"children":310},{"style":259},[311],{"type":67,"value":312}," =>",{"type":62,"tag":184,"props":314,"children":315},{"style":197},[316],{"type":67,"value":317}," {\n",{"type":62,"tag":184,"props":319,"children":321},{"class":186,"line":320},5,[322,327,331,337,342,346,351,356],{"type":62,"tag":184,"props":323,"children":324},{"style":191},[325],{"type":67,"value":326},"  return",{"type":62,"tag":184,"props":328,"children":329},{"style":197},[330],{"type":67,"value":200},{"type":62,"tag":184,"props":332,"children":334},{"style":333},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[335],{"type":67,"value":336}," message",{"type":62,"tag":184,"props":338,"children":339},{"style":197},[340],{"type":67,"value":341},":",{"type":62,"tag":184,"props":343,"children":344},{"style":197},[345],{"type":67,"value":221},{"type":62,"tag":184,"props":347,"children":348},{"style":224},[349],{"type":67,"value":350},"Hello from server!",{"type":62,"tag":184,"props":352,"children":353},{"style":197},[354],{"type":67,"value":355},"'",{"type":62,"tag":184,"props":357,"children":358},{"style":197},[359],{"type":67,"value":360}," }\n",{"type":62,"tag":184,"props":362,"children":364},{"class":186,"line":363},6,[365,370],{"type":62,"tag":184,"props":366,"children":367},{"style":197},[368],{"type":67,"value":369},"}",{"type":62,"tag":184,"props":371,"children":372},{"style":203},[373],{"type":67,"value":374},")\n",{"type":62,"tag":184,"props":376,"children":378},{"class":186,"line":377},7,[379],{"type":62,"tag":184,"props":380,"children":381},{"emptyLinePlaceholder":239},[382],{"type":67,"value":242},{"type":62,"tag":184,"props":384,"children":386},{"class":186,"line":385},8,[387],{"type":62,"tag":184,"props":388,"children":389},{"style":249},[390],{"type":67,"value":391},"\u002F\u002F POST\n",{"type":62,"tag":184,"props":393,"children":395},{"class":186,"line":394},9,[396,400,405,409,413,417,422,427,431,435,440,444,448,453,457,461,465,469,473,477],{"type":62,"tag":184,"props":397,"children":398},{"style":259},[399],{"type":67,"value":262},{"type":62,"tag":184,"props":401,"children":402},{"style":203},[403],{"type":67,"value":404}," saveData ",{"type":62,"tag":184,"props":406,"children":407},{"style":197},[408],{"type":67,"value":272},{"type":62,"tag":184,"props":410,"children":411},{"style":275},[412],{"type":67,"value":206},{"type":62,"tag":184,"props":414,"children":415},{"style":203},[416],{"type":67,"value":297},{"type":62,"tag":184,"props":418,"children":419},{"style":197},[420],{"type":67,"value":421},"{",{"type":62,"tag":184,"props":423,"children":424},{"style":333},[425],{"type":67,"value":426}," method",{"type":62,"tag":184,"props":428,"children":429},{"style":197},[430],{"type":67,"value":341},{"type":62,"tag":184,"props":432,"children":433},{"style":197},[434],{"type":67,"value":221},{"type":62,"tag":184,"props":436,"children":437},{"style":224},[438],{"type":67,"value":439},"POST",{"type":62,"tag":184,"props":441,"children":442},{"style":197},[443],{"type":67,"value":355},{"type":62,"tag":184,"props":445,"children":446},{"style":197},[447],{"type":67,"value":211},{"type":62,"tag":184,"props":449,"children":450},{"style":203},[451],{"type":67,"value":452},")",{"type":62,"tag":184,"props":454,"children":455},{"style":197},[456],{"type":67,"value":287},{"type":62,"tag":184,"props":458,"children":459},{"style":275},[460],{"type":67,"value":292},{"type":62,"tag":184,"props":462,"children":463},{"style":203},[464],{"type":67,"value":297},{"type":62,"tag":184,"props":466,"children":467},{"style":259},[468],{"type":67,"value":302},{"type":62,"tag":184,"props":470,"children":471},{"style":197},[472],{"type":67,"value":307},{"type":62,"tag":184,"props":474,"children":475},{"style":259},[476],{"type":67,"value":312},{"type":62,"tag":184,"props":478,"children":479},{"style":197},[480],{"type":67,"value":317},{"type":62,"tag":184,"props":482,"children":484},{"class":186,"line":483},10,[485,489,493,498,502,508],{"type":62,"tag":184,"props":486,"children":487},{"style":191},[488],{"type":67,"value":326},{"type":62,"tag":184,"props":490,"children":491},{"style":197},[492],{"type":67,"value":200},{"type":62,"tag":184,"props":494,"children":495},{"style":333},[496],{"type":67,"value":497}," success",{"type":62,"tag":184,"props":499,"children":500},{"style":197},[501],{"type":67,"value":341},{"type":62,"tag":184,"props":503,"children":505},{"style":504},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[506],{"type":67,"value":507}," true",{"type":62,"tag":184,"props":509,"children":510},{"style":197},[511],{"type":67,"value":360},{"type":62,"tag":184,"props":513,"children":515},{"class":186,"line":514},11,[516,520],{"type":62,"tag":184,"props":517,"children":518},{"style":197},[519],{"type":67,"value":369},{"type":62,"tag":184,"props":521,"children":522},{"style":203},[523],{"type":67,"value":374},{"type":62,"tag":166,"props":525,"children":527},{"id":526},"calling-from-loaders",[528],{"type":67,"value":529},"Calling from Loaders",{"type":62,"tag":173,"props":531,"children":533},{"className":175,"code":532,"language":177,"meta":178,"style":178},"import { createFileRoute } from '@tanstack\u002Freact-router'\nimport { createServerFn } from '@tanstack\u002Freact-start'\n\nconst getPosts = createServerFn({ method: 'GET' }).handler(async () => {\n  const posts = await db.query('SELECT * FROM posts')\n  return { posts }\n})\n\nexport const Route = createFileRoute('\u002Fposts')({\n  loader: () => getPosts(),\n  component: PostList,\n})\n\nfunction PostList() {\n  const { posts } = Route.useLoaderData()\n  return (\n    \u003Cul>\n      {posts.map((p) => (\n        \u003Cli key={p.id}>{p.title}\u003C\u002Fli>\n      ))}\n    \u003C\u002Ful>\n  )\n}\n",[534],{"type":62,"tag":76,"props":535,"children":536},{"__ignoreMap":178},[537,574,609,616,701,759,778,789,796,848,882,903,915,923,944,987,1000,1019,1067,1135,1149,1166,1175],{"type":62,"tag":184,"props":538,"children":539},{"class":186,"line":187},[540,544,548,553,557,561,565,570],{"type":62,"tag":184,"props":541,"children":542},{"style":191},[543],{"type":67,"value":194},{"type":62,"tag":184,"props":545,"children":546},{"style":197},[547],{"type":67,"value":200},{"type":62,"tag":184,"props":549,"children":550},{"style":203},[551],{"type":67,"value":552}," createFileRoute",{"type":62,"tag":184,"props":554,"children":555},{"style":197},[556],{"type":67,"value":211},{"type":62,"tag":184,"props":558,"children":559},{"style":191},[560],{"type":67,"value":216},{"type":62,"tag":184,"props":562,"children":563},{"style":197},[564],{"type":67,"value":221},{"type":62,"tag":184,"props":566,"children":567},{"style":224},[568],{"type":67,"value":569},"@tanstack\u002Freact-router",{"type":62,"tag":184,"props":571,"children":572},{"style":197},[573],{"type":67,"value":232},{"type":62,"tag":184,"props":575,"children":576},{"class":186,"line":235},[577,581,585,589,593,597,601,605],{"type":62,"tag":184,"props":578,"children":579},{"style":191},[580],{"type":67,"value":194},{"type":62,"tag":184,"props":582,"children":583},{"style":197},[584],{"type":67,"value":200},{"type":62,"tag":184,"props":586,"children":587},{"style":203},[588],{"type":67,"value":206},{"type":62,"tag":184,"props":590,"children":591},{"style":197},[592],{"type":67,"value":211},{"type":62,"tag":184,"props":594,"children":595},{"style":191},[596],{"type":67,"value":216},{"type":62,"tag":184,"props":598,"children":599},{"style":197},[600],{"type":67,"value":221},{"type":62,"tag":184,"props":602,"children":603},{"style":224},[604],{"type":67,"value":227},{"type":62,"tag":184,"props":606,"children":607},{"style":197},[608],{"type":67,"value":232},{"type":62,"tag":184,"props":610,"children":611},{"class":186,"line":245},[612],{"type":62,"tag":184,"props":613,"children":614},{"emptyLinePlaceholder":239},[615],{"type":67,"value":242},{"type":62,"tag":184,"props":617,"children":618},{"class":186,"line":255},[619,623,628,632,636,640,644,648,652,656,661,665,669,673,677,681,685,689,693,697],{"type":62,"tag":184,"props":620,"children":621},{"style":259},[622],{"type":67,"value":262},{"type":62,"tag":184,"props":624,"children":625},{"style":203},[626],{"type":67,"value":627}," getPosts ",{"type":62,"tag":184,"props":629,"children":630},{"style":197},[631],{"type":67,"value":272},{"type":62,"tag":184,"props":633,"children":634},{"style":275},[635],{"type":67,"value":206},{"type":62,"tag":184,"props":637,"children":638},{"style":203},[639],{"type":67,"value":297},{"type":62,"tag":184,"props":641,"children":642},{"style":197},[643],{"type":67,"value":421},{"type":62,"tag":184,"props":645,"children":646},{"style":333},[647],{"type":67,"value":426},{"type":62,"tag":184,"props":649,"children":650},{"style":197},[651],{"type":67,"value":341},{"type":62,"tag":184,"props":653,"children":654},{"style":197},[655],{"type":67,"value":221},{"type":62,"tag":184,"props":657,"children":658},{"style":224},[659],{"type":67,"value":660},"GET",{"type":62,"tag":184,"props":662,"children":663},{"style":197},[664],{"type":67,"value":355},{"type":62,"tag":184,"props":666,"children":667},{"style":197},[668],{"type":67,"value":211},{"type":62,"tag":184,"props":670,"children":671},{"style":203},[672],{"type":67,"value":452},{"type":62,"tag":184,"props":674,"children":675},{"style":197},[676],{"type":67,"value":287},{"type":62,"tag":184,"props":678,"children":679},{"style":275},[680],{"type":67,"value":292},{"type":62,"tag":184,"props":682,"children":683},{"style":203},[684],{"type":67,"value":297},{"type":62,"tag":184,"props":686,"children":687},{"style":259},[688],{"type":67,"value":302},{"type":62,"tag":184,"props":690,"children":691},{"style":197},[692],{"type":67,"value":307},{"type":62,"tag":184,"props":694,"children":695},{"style":259},[696],{"type":67,"value":312},{"type":62,"tag":184,"props":698,"children":699},{"style":197},[700],{"type":67,"value":317},{"type":62,"tag":184,"props":702,"children":703},{"class":186,"line":320},[704,709,714,719,724,729,733,738,742,746,751,755],{"type":62,"tag":184,"props":705,"children":706},{"style":259},[707],{"type":67,"value":708},"  const",{"type":62,"tag":184,"props":710,"children":711},{"style":203},[712],{"type":67,"value":713}," posts",{"type":62,"tag":184,"props":715,"children":716},{"style":197},[717],{"type":67,"value":718}," =",{"type":62,"tag":184,"props":720,"children":721},{"style":191},[722],{"type":67,"value":723}," await",{"type":62,"tag":184,"props":725,"children":726},{"style":203},[727],{"type":67,"value":728}," db",{"type":62,"tag":184,"props":730,"children":731},{"style":197},[732],{"type":67,"value":287},{"type":62,"tag":184,"props":734,"children":735},{"style":275},[736],{"type":67,"value":737},"query",{"type":62,"tag":184,"props":739,"children":740},{"style":333},[741],{"type":67,"value":297},{"type":62,"tag":184,"props":743,"children":744},{"style":197},[745],{"type":67,"value":355},{"type":62,"tag":184,"props":747,"children":748},{"style":224},[749],{"type":67,"value":750},"SELECT * FROM posts",{"type":62,"tag":184,"props":752,"children":753},{"style":197},[754],{"type":67,"value":355},{"type":62,"tag":184,"props":756,"children":757},{"style":333},[758],{"type":67,"value":374},{"type":62,"tag":184,"props":760,"children":761},{"class":186,"line":363},[762,766,770,774],{"type":62,"tag":184,"props":763,"children":764},{"style":191},[765],{"type":67,"value":326},{"type":62,"tag":184,"props":767,"children":768},{"style":197},[769],{"type":67,"value":200},{"type":62,"tag":184,"props":771,"children":772},{"style":203},[773],{"type":67,"value":713},{"type":62,"tag":184,"props":775,"children":776},{"style":197},[777],{"type":67,"value":360},{"type":62,"tag":184,"props":779,"children":780},{"class":186,"line":377},[781,785],{"type":62,"tag":184,"props":782,"children":783},{"style":197},[784],{"type":67,"value":369},{"type":62,"tag":184,"props":786,"children":787},{"style":203},[788],{"type":67,"value":374},{"type":62,"tag":184,"props":790,"children":791},{"class":186,"line":385},[792],{"type":62,"tag":184,"props":793,"children":794},{"emptyLinePlaceholder":239},[795],{"type":67,"value":242},{"type":62,"tag":184,"props":797,"children":798},{"class":186,"line":394},[799,804,809,813,817,821,825,829,834,838,843],{"type":62,"tag":184,"props":800,"children":801},{"style":191},[802],{"type":67,"value":803},"export",{"type":62,"tag":184,"props":805,"children":806},{"style":259},[807],{"type":67,"value":808}," const",{"type":62,"tag":184,"props":810,"children":811},{"style":203},[812],{"type":67,"value":105},{"type":62,"tag":184,"props":814,"children":815},{"style":197},[816],{"type":67,"value":272},{"type":62,"tag":184,"props":818,"children":819},{"style":275},[820],{"type":67,"value":552},{"type":62,"tag":184,"props":822,"children":823},{"style":203},[824],{"type":67,"value":297},{"type":62,"tag":184,"props":826,"children":827},{"style":197},[828],{"type":67,"value":355},{"type":62,"tag":184,"props":830,"children":831},{"style":224},[832],{"type":67,"value":833},"\u002Fposts",{"type":62,"tag":184,"props":835,"children":836},{"style":197},[837],{"type":67,"value":355},{"type":62,"tag":184,"props":839,"children":840},{"style":203},[841],{"type":67,"value":842},")(",{"type":62,"tag":184,"props":844,"children":845},{"style":197},[846],{"type":67,"value":847},"{\n",{"type":62,"tag":184,"props":849,"children":850},{"class":186,"line":483},[851,856,860,864,868,873,877],{"type":62,"tag":184,"props":852,"children":853},{"style":275},[854],{"type":67,"value":855},"  loader",{"type":62,"tag":184,"props":857,"children":858},{"style":197},[859],{"type":67,"value":341},{"type":62,"tag":184,"props":861,"children":862},{"style":197},[863],{"type":67,"value":307},{"type":62,"tag":184,"props":865,"children":866},{"style":259},[867],{"type":67,"value":312},{"type":62,"tag":184,"props":869,"children":870},{"style":275},[871],{"type":67,"value":872}," getPosts",{"type":62,"tag":184,"props":874,"children":875},{"style":203},[876],{"type":67,"value":282},{"type":62,"tag":184,"props":878,"children":879},{"style":197},[880],{"type":67,"value":881},",\n",{"type":62,"tag":184,"props":883,"children":884},{"class":186,"line":514},[885,890,894,899],{"type":62,"tag":184,"props":886,"children":887},{"style":333},[888],{"type":67,"value":889},"  component",{"type":62,"tag":184,"props":891,"children":892},{"style":197},[893],{"type":67,"value":341},{"type":62,"tag":184,"props":895,"children":896},{"style":203},[897],{"type":67,"value":898}," PostList",{"type":62,"tag":184,"props":900,"children":901},{"style":197},[902],{"type":67,"value":881},{"type":62,"tag":184,"props":904,"children":906},{"class":186,"line":905},12,[907,911],{"type":62,"tag":184,"props":908,"children":909},{"style":197},[910],{"type":67,"value":369},{"type":62,"tag":184,"props":912,"children":913},{"style":203},[914],{"type":67,"value":374},{"type":62,"tag":184,"props":916,"children":918},{"class":186,"line":917},13,[919],{"type":62,"tag":184,"props":920,"children":921},{"emptyLinePlaceholder":239},[922],{"type":67,"value":242},{"type":62,"tag":184,"props":924,"children":926},{"class":186,"line":925},14,[927,932,936,940],{"type":62,"tag":184,"props":928,"children":929},{"style":259},[930],{"type":67,"value":931},"function",{"type":62,"tag":184,"props":933,"children":934},{"style":275},[935],{"type":67,"value":898},{"type":62,"tag":184,"props":937,"children":938},{"style":197},[939],{"type":67,"value":282},{"type":62,"tag":184,"props":941,"children":942},{"style":197},[943],{"type":67,"value":317},{"type":62,"tag":184,"props":945,"children":947},{"class":186,"line":946},15,[948,952,956,960,964,968,973,977,982],{"type":62,"tag":184,"props":949,"children":950},{"style":259},[951],{"type":67,"value":708},{"type":62,"tag":184,"props":953,"children":954},{"style":197},[955],{"type":67,"value":200},{"type":62,"tag":184,"props":957,"children":958},{"style":203},[959],{"type":67,"value":713},{"type":62,"tag":184,"props":961,"children":962},{"style":197},[963],{"type":67,"value":211},{"type":62,"tag":184,"props":965,"children":966},{"style":197},[967],{"type":67,"value":718},{"type":62,"tag":184,"props":969,"children":970},{"style":203},[971],{"type":67,"value":972}," Route",{"type":62,"tag":184,"props":974,"children":975},{"style":197},[976],{"type":67,"value":287},{"type":62,"tag":184,"props":978,"children":979},{"style":275},[980],{"type":67,"value":981},"useLoaderData",{"type":62,"tag":184,"props":983,"children":984},{"style":333},[985],{"type":67,"value":986},"()\n",{"type":62,"tag":184,"props":988,"children":990},{"class":186,"line":989},16,[991,995],{"type":62,"tag":184,"props":992,"children":993},{"style":191},[994],{"type":67,"value":326},{"type":62,"tag":184,"props":996,"children":997},{"style":333},[998],{"type":67,"value":999}," (\n",{"type":62,"tag":184,"props":1001,"children":1003},{"class":186,"line":1002},17,[1004,1009,1014],{"type":62,"tag":184,"props":1005,"children":1006},{"style":197},[1007],{"type":67,"value":1008},"    \u003C",{"type":62,"tag":184,"props":1010,"children":1011},{"style":333},[1012],{"type":67,"value":1013},"ul",{"type":62,"tag":184,"props":1015,"children":1016},{"style":197},[1017],{"type":67,"value":1018},">\n",{"type":62,"tag":184,"props":1020,"children":1022},{"class":186,"line":1021},18,[1023,1028,1033,1037,1042,1046,1050,1055,1059,1063],{"type":62,"tag":184,"props":1024,"children":1025},{"style":197},[1026],{"type":67,"value":1027},"      {",{"type":62,"tag":184,"props":1029,"children":1030},{"style":203},[1031],{"type":67,"value":1032},"posts",{"type":62,"tag":184,"props":1034,"children":1035},{"style":197},[1036],{"type":67,"value":287},{"type":62,"tag":184,"props":1038,"children":1039},{"style":275},[1040],{"type":67,"value":1041},"map",{"type":62,"tag":184,"props":1043,"children":1044},{"style":203},[1045],{"type":67,"value":297},{"type":62,"tag":184,"props":1047,"children":1048},{"style":197},[1049],{"type":67,"value":297},{"type":62,"tag":184,"props":1051,"children":1053},{"style":1052},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1054],{"type":67,"value":70},{"type":62,"tag":184,"props":1056,"children":1057},{"style":197},[1058],{"type":67,"value":452},{"type":62,"tag":184,"props":1060,"children":1061},{"style":259},[1062],{"type":67,"value":312},{"type":62,"tag":184,"props":1064,"children":1065},{"style":203},[1066],{"type":67,"value":999},{"type":62,"tag":184,"props":1068,"children":1070},{"class":186,"line":1069},19,[1071,1076,1081,1086,1091,1095,1099,1104,1109,1113,1117,1122,1127,1131],{"type":62,"tag":184,"props":1072,"children":1073},{"style":197},[1074],{"type":67,"value":1075},"        \u003C",{"type":62,"tag":184,"props":1077,"children":1078},{"style":333},[1079],{"type":67,"value":1080},"li",{"type":62,"tag":184,"props":1082,"children":1083},{"style":259},[1084],{"type":67,"value":1085}," key",{"type":62,"tag":184,"props":1087,"children":1088},{"style":197},[1089],{"type":67,"value":1090},"={",{"type":62,"tag":184,"props":1092,"children":1093},{"style":203},[1094],{"type":67,"value":70},{"type":62,"tag":184,"props":1096,"children":1097},{"style":197},[1098],{"type":67,"value":287},{"type":62,"tag":184,"props":1100,"children":1101},{"style":203},[1102],{"type":67,"value":1103},"id",{"type":62,"tag":184,"props":1105,"children":1106},{"style":197},[1107],{"type":67,"value":1108},"}>{",{"type":62,"tag":184,"props":1110,"children":1111},{"style":203},[1112],{"type":67,"value":70},{"type":62,"tag":184,"props":1114,"children":1115},{"style":197},[1116],{"type":67,"value":287},{"type":62,"tag":184,"props":1118,"children":1119},{"style":203},[1120],{"type":67,"value":1121},"title",{"type":62,"tag":184,"props":1123,"children":1124},{"style":197},[1125],{"type":67,"value":1126},"}\u003C\u002F",{"type":62,"tag":184,"props":1128,"children":1129},{"style":333},[1130],{"type":67,"value":1080},{"type":62,"tag":184,"props":1132,"children":1133},{"style":197},[1134],{"type":67,"value":1018},{"type":62,"tag":184,"props":1136,"children":1138},{"class":186,"line":1137},20,[1139,1144],{"type":62,"tag":184,"props":1140,"children":1141},{"style":203},[1142],{"type":67,"value":1143},"      ))",{"type":62,"tag":184,"props":1145,"children":1146},{"style":197},[1147],{"type":67,"value":1148},"}\n",{"type":62,"tag":184,"props":1150,"children":1152},{"class":186,"line":1151},21,[1153,1158,1162],{"type":62,"tag":184,"props":1154,"children":1155},{"style":197},[1156],{"type":67,"value":1157},"    \u003C\u002F",{"type":62,"tag":184,"props":1159,"children":1160},{"style":333},[1161],{"type":67,"value":1013},{"type":62,"tag":184,"props":1163,"children":1164},{"style":197},[1165],{"type":67,"value":1018},{"type":62,"tag":184,"props":1167,"children":1169},{"class":186,"line":1168},22,[1170],{"type":62,"tag":184,"props":1171,"children":1172},{"style":333},[1173],{"type":67,"value":1174},"  )\n",{"type":62,"tag":184,"props":1176,"children":1178},{"class":186,"line":1177},23,[1179],{"type":62,"tag":184,"props":1180,"children":1181},{"style":197},[1182],{"type":67,"value":1148},{"type":62,"tag":166,"props":1184,"children":1186},{"id":1185},"calling-from-components",[1187],{"type":67,"value":1188},"Calling from Components",{"type":62,"tag":70,"props":1190,"children":1191},{},[1192,1194,1200],{"type":67,"value":1193},"Use the ",{"type":62,"tag":76,"props":1195,"children":1197},{"className":1196},[],[1198],{"type":67,"value":1199},"useServerFn",{"type":67,"value":1201}," hook to call server functions from event handlers:",{"type":62,"tag":173,"props":1203,"children":1205},{"className":175,"code":1204,"language":177,"meta":178,"style":178},"import { useServerFn } from '@tanstack\u002Freact-start'\n\nconst deletePost = createServerFn({ method: 'POST' })\n  .validator((data: { id: string }) => data)\n  .handler(async ({ data }) => {\n    await db.delete('posts').where({ id: data.id })\n    return { success: true }\n  })\n\nfunction DeleteButton({ postId }: { postId: string }) {\n  const deletePostFn = useServerFn(deletePost)\n\n  return (\n    \u003Cbutton onClick={() => deletePostFn({ data: { id: postId } })}>\n      Delete\n    \u003C\u002Fbutton>\n  )\n}\n",[1206],{"type":62,"tag":76,"props":1207,"children":1208},{"__ignoreMap":178},[1209,1245,1252,1308,1371,1412,1498,1526,1538,1545,1596,1629,1636,1647,1727,1735,1750,1757],{"type":62,"tag":184,"props":1210,"children":1211},{"class":186,"line":187},[1212,1216,1220,1225,1229,1233,1237,1241],{"type":62,"tag":184,"props":1213,"children":1214},{"style":191},[1215],{"type":67,"value":194},{"type":62,"tag":184,"props":1217,"children":1218},{"style":197},[1219],{"type":67,"value":200},{"type":62,"tag":184,"props":1221,"children":1222},{"style":203},[1223],{"type":67,"value":1224}," useServerFn",{"type":62,"tag":184,"props":1226,"children":1227},{"style":197},[1228],{"type":67,"value":211},{"type":62,"tag":184,"props":1230,"children":1231},{"style":191},[1232],{"type":67,"value":216},{"type":62,"tag":184,"props":1234,"children":1235},{"style":197},[1236],{"type":67,"value":221},{"type":62,"tag":184,"props":1238,"children":1239},{"style":224},[1240],{"type":67,"value":227},{"type":62,"tag":184,"props":1242,"children":1243},{"style":197},[1244],{"type":67,"value":232},{"type":62,"tag":184,"props":1246,"children":1247},{"class":186,"line":235},[1248],{"type":62,"tag":184,"props":1249,"children":1250},{"emptyLinePlaceholder":239},[1251],{"type":67,"value":242},{"type":62,"tag":184,"props":1253,"children":1254},{"class":186,"line":245},[1255,1259,1264,1268,1272,1276,1280,1284,1288,1292,1296,1300,1304],{"type":62,"tag":184,"props":1256,"children":1257},{"style":259},[1258],{"type":67,"value":262},{"type":62,"tag":184,"props":1260,"children":1261},{"style":203},[1262],{"type":67,"value":1263}," deletePost ",{"type":62,"tag":184,"props":1265,"children":1266},{"style":197},[1267],{"type":67,"value":272},{"type":62,"tag":184,"props":1269,"children":1270},{"style":275},[1271],{"type":67,"value":206},{"type":62,"tag":184,"props":1273,"children":1274},{"style":203},[1275],{"type":67,"value":297},{"type":62,"tag":184,"props":1277,"children":1278},{"style":197},[1279],{"type":67,"value":421},{"type":62,"tag":184,"props":1281,"children":1282},{"style":333},[1283],{"type":67,"value":426},{"type":62,"tag":184,"props":1285,"children":1286},{"style":197},[1287],{"type":67,"value":341},{"type":62,"tag":184,"props":1289,"children":1290},{"style":197},[1291],{"type":67,"value":221},{"type":62,"tag":184,"props":1293,"children":1294},{"style":224},[1295],{"type":67,"value":439},{"type":62,"tag":184,"props":1297,"children":1298},{"style":197},[1299],{"type":67,"value":355},{"type":62,"tag":184,"props":1301,"children":1302},{"style":197},[1303],{"type":67,"value":211},{"type":62,"tag":184,"props":1305,"children":1306},{"style":203},[1307],{"type":67,"value":374},{"type":62,"tag":184,"props":1309,"children":1310},{"class":186,"line":255},[1311,1316,1321,1325,1329,1334,1338,1342,1347,1351,1357,1362,1366],{"type":62,"tag":184,"props":1312,"children":1313},{"style":197},[1314],{"type":67,"value":1315},"  .",{"type":62,"tag":184,"props":1317,"children":1318},{"style":275},[1319],{"type":67,"value":1320},"validator",{"type":62,"tag":184,"props":1322,"children":1323},{"style":203},[1324],{"type":67,"value":297},{"type":62,"tag":184,"props":1326,"children":1327},{"style":197},[1328],{"type":67,"value":297},{"type":62,"tag":184,"props":1330,"children":1331},{"style":1052},[1332],{"type":67,"value":1333},"data",{"type":62,"tag":184,"props":1335,"children":1336},{"style":197},[1337],{"type":67,"value":341},{"type":62,"tag":184,"props":1339,"children":1340},{"style":197},[1341],{"type":67,"value":200},{"type":62,"tag":184,"props":1343,"children":1344},{"style":333},[1345],{"type":67,"value":1346}," id",{"type":62,"tag":184,"props":1348,"children":1349},{"style":197},[1350],{"type":67,"value":341},{"type":62,"tag":184,"props":1352,"children":1354},{"style":1353},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1355],{"type":67,"value":1356}," string",{"type":62,"tag":184,"props":1358,"children":1359},{"style":197},[1360],{"type":67,"value":1361}," })",{"type":62,"tag":184,"props":1363,"children":1364},{"style":259},[1365],{"type":67,"value":312},{"type":62,"tag":184,"props":1367,"children":1368},{"style":203},[1369],{"type":67,"value":1370}," data)\n",{"type":62,"tag":184,"props":1372,"children":1373},{"class":186,"line":320},[1374,1378,1382,1386,1390,1395,1400,1404,1408],{"type":62,"tag":184,"props":1375,"children":1376},{"style":197},[1377],{"type":67,"value":1315},{"type":62,"tag":184,"props":1379,"children":1380},{"style":275},[1381],{"type":67,"value":292},{"type":62,"tag":184,"props":1383,"children":1384},{"style":203},[1385],{"type":67,"value":297},{"type":62,"tag":184,"props":1387,"children":1388},{"style":259},[1389],{"type":67,"value":302},{"type":62,"tag":184,"props":1391,"children":1392},{"style":197},[1393],{"type":67,"value":1394}," ({",{"type":62,"tag":184,"props":1396,"children":1397},{"style":1052},[1398],{"type":67,"value":1399}," data",{"type":62,"tag":184,"props":1401,"children":1402},{"style":197},[1403],{"type":67,"value":1361},{"type":62,"tag":184,"props":1405,"children":1406},{"style":259},[1407],{"type":67,"value":312},{"type":62,"tag":184,"props":1409,"children":1410},{"style":197},[1411],{"type":67,"value":317},{"type":62,"tag":184,"props":1413,"children":1414},{"class":186,"line":363},[1415,1420,1424,1428,1433,1437,1441,1445,1449,1453,1457,1462,1466,1470,1474,1478,1482,1486,1490,1494],{"type":62,"tag":184,"props":1416,"children":1417},{"style":191},[1418],{"type":67,"value":1419},"    await",{"type":62,"tag":184,"props":1421,"children":1422},{"style":203},[1423],{"type":67,"value":728},{"type":62,"tag":184,"props":1425,"children":1426},{"style":197},[1427],{"type":67,"value":287},{"type":62,"tag":184,"props":1429,"children":1430},{"style":275},[1431],{"type":67,"value":1432},"delete",{"type":62,"tag":184,"props":1434,"children":1435},{"style":333},[1436],{"type":67,"value":297},{"type":62,"tag":184,"props":1438,"children":1439},{"style":197},[1440],{"type":67,"value":355},{"type":62,"tag":184,"props":1442,"children":1443},{"style":224},[1444],{"type":67,"value":1032},{"type":62,"tag":184,"props":1446,"children":1447},{"style":197},[1448],{"type":67,"value":355},{"type":62,"tag":184,"props":1450,"children":1451},{"style":333},[1452],{"type":67,"value":452},{"type":62,"tag":184,"props":1454,"children":1455},{"style":197},[1456],{"type":67,"value":287},{"type":62,"tag":184,"props":1458,"children":1459},{"style":275},[1460],{"type":67,"value":1461},"where",{"type":62,"tag":184,"props":1463,"children":1464},{"style":333},[1465],{"type":67,"value":297},{"type":62,"tag":184,"props":1467,"children":1468},{"style":197},[1469],{"type":67,"value":421},{"type":62,"tag":184,"props":1471,"children":1472},{"style":333},[1473],{"type":67,"value":1346},{"type":62,"tag":184,"props":1475,"children":1476},{"style":197},[1477],{"type":67,"value":341},{"type":62,"tag":184,"props":1479,"children":1480},{"style":203},[1481],{"type":67,"value":1399},{"type":62,"tag":184,"props":1483,"children":1484},{"style":197},[1485],{"type":67,"value":287},{"type":62,"tag":184,"props":1487,"children":1488},{"style":203},[1489],{"type":67,"value":1103},{"type":62,"tag":184,"props":1491,"children":1492},{"style":197},[1493],{"type":67,"value":211},{"type":62,"tag":184,"props":1495,"children":1496},{"style":333},[1497],{"type":67,"value":374},{"type":62,"tag":184,"props":1499,"children":1500},{"class":186,"line":377},[1501,1506,1510,1514,1518,1522],{"type":62,"tag":184,"props":1502,"children":1503},{"style":191},[1504],{"type":67,"value":1505},"    return",{"type":62,"tag":184,"props":1507,"children":1508},{"style":197},[1509],{"type":67,"value":200},{"type":62,"tag":184,"props":1511,"children":1512},{"style":333},[1513],{"type":67,"value":497},{"type":62,"tag":184,"props":1515,"children":1516},{"style":197},[1517],{"type":67,"value":341},{"type":62,"tag":184,"props":1519,"children":1520},{"style":504},[1521],{"type":67,"value":507},{"type":62,"tag":184,"props":1523,"children":1524},{"style":197},[1525],{"type":67,"value":360},{"type":62,"tag":184,"props":1527,"children":1528},{"class":186,"line":385},[1529,1534],{"type":62,"tag":184,"props":1530,"children":1531},{"style":197},[1532],{"type":67,"value":1533},"  }",{"type":62,"tag":184,"props":1535,"children":1536},{"style":203},[1537],{"type":67,"value":374},{"type":62,"tag":184,"props":1539,"children":1540},{"class":186,"line":394},[1541],{"type":62,"tag":184,"props":1542,"children":1543},{"emptyLinePlaceholder":239},[1544],{"type":67,"value":242},{"type":62,"tag":184,"props":1546,"children":1547},{"class":186,"line":483},[1548,1552,1557,1562,1567,1572,1576,1580,1584,1588,1592],{"type":62,"tag":184,"props":1549,"children":1550},{"style":259},[1551],{"type":67,"value":931},{"type":62,"tag":184,"props":1553,"children":1554},{"style":275},[1555],{"type":67,"value":1556}," DeleteButton",{"type":62,"tag":184,"props":1558,"children":1559},{"style":197},[1560],{"type":67,"value":1561},"({",{"type":62,"tag":184,"props":1563,"children":1564},{"style":1052},[1565],{"type":67,"value":1566}," postId",{"type":62,"tag":184,"props":1568,"children":1569},{"style":197},[1570],{"type":67,"value":1571}," }:",{"type":62,"tag":184,"props":1573,"children":1574},{"style":197},[1575],{"type":67,"value":200},{"type":62,"tag":184,"props":1577,"children":1578},{"style":333},[1579],{"type":67,"value":1566},{"type":62,"tag":184,"props":1581,"children":1582},{"style":197},[1583],{"type":67,"value":341},{"type":62,"tag":184,"props":1585,"children":1586},{"style":1353},[1587],{"type":67,"value":1356},{"type":62,"tag":184,"props":1589,"children":1590},{"style":197},[1591],{"type":67,"value":1361},{"type":62,"tag":184,"props":1593,"children":1594},{"style":197},[1595],{"type":67,"value":317},{"type":62,"tag":184,"props":1597,"children":1598},{"class":186,"line":514},[1599,1603,1608,1612,1616,1620,1625],{"type":62,"tag":184,"props":1600,"children":1601},{"style":259},[1602],{"type":67,"value":708},{"type":62,"tag":184,"props":1604,"children":1605},{"style":203},[1606],{"type":67,"value":1607}," deletePostFn",{"type":62,"tag":184,"props":1609,"children":1610},{"style":197},[1611],{"type":67,"value":718},{"type":62,"tag":184,"props":1613,"children":1614},{"style":275},[1615],{"type":67,"value":1224},{"type":62,"tag":184,"props":1617,"children":1618},{"style":333},[1619],{"type":67,"value":297},{"type":62,"tag":184,"props":1621,"children":1622},{"style":203},[1623],{"type":67,"value":1624},"deletePost",{"type":62,"tag":184,"props":1626,"children":1627},{"style":333},[1628],{"type":67,"value":374},{"type":62,"tag":184,"props":1630,"children":1631},{"class":186,"line":905},[1632],{"type":62,"tag":184,"props":1633,"children":1634},{"emptyLinePlaceholder":239},[1635],{"type":67,"value":242},{"type":62,"tag":184,"props":1637,"children":1638},{"class":186,"line":917},[1639,1643],{"type":62,"tag":184,"props":1640,"children":1641},{"style":191},[1642],{"type":67,"value":326},{"type":62,"tag":184,"props":1644,"children":1645},{"style":333},[1646],{"type":67,"value":999},{"type":62,"tag":184,"props":1648,"children":1649},{"class":186,"line":925},[1650,1654,1659,1664,1669,1673,1677,1681,1685,1689,1693,1697,1701,1705,1710,1714,1718,1722],{"type":62,"tag":184,"props":1651,"children":1652},{"style":197},[1653],{"type":67,"value":1008},{"type":62,"tag":184,"props":1655,"children":1656},{"style":333},[1657],{"type":67,"value":1658},"button",{"type":62,"tag":184,"props":1660,"children":1661},{"style":259},[1662],{"type":67,"value":1663}," onClick",{"type":62,"tag":184,"props":1665,"children":1666},{"style":197},[1667],{"type":67,"value":1668},"={()",{"type":62,"tag":184,"props":1670,"children":1671},{"style":259},[1672],{"type":67,"value":312},{"type":62,"tag":184,"props":1674,"children":1675},{"style":275},[1676],{"type":67,"value":1607},{"type":62,"tag":184,"props":1678,"children":1679},{"style":203},[1680],{"type":67,"value":297},{"type":62,"tag":184,"props":1682,"children":1683},{"style":197},[1684],{"type":67,"value":421},{"type":62,"tag":184,"props":1686,"children":1687},{"style":333},[1688],{"type":67,"value":1399},{"type":62,"tag":184,"props":1690,"children":1691},{"style":197},[1692],{"type":67,"value":341},{"type":62,"tag":184,"props":1694,"children":1695},{"style":197},[1696],{"type":67,"value":200},{"type":62,"tag":184,"props":1698,"children":1699},{"style":333},[1700],{"type":67,"value":1346},{"type":62,"tag":184,"props":1702,"children":1703},{"style":197},[1704],{"type":67,"value":341},{"type":62,"tag":184,"props":1706,"children":1707},{"style":203},[1708],{"type":67,"value":1709}," postId ",{"type":62,"tag":184,"props":1711,"children":1712},{"style":197},[1713],{"type":67,"value":369},{"type":62,"tag":184,"props":1715,"children":1716},{"style":197},[1717],{"type":67,"value":211},{"type":62,"tag":184,"props":1719,"children":1720},{"style":203},[1721],{"type":67,"value":452},{"type":62,"tag":184,"props":1723,"children":1724},{"style":197},[1725],{"type":67,"value":1726},"}>\n",{"type":62,"tag":184,"props":1728,"children":1729},{"class":186,"line":946},[1730],{"type":62,"tag":184,"props":1731,"children":1732},{"style":203},[1733],{"type":67,"value":1734},"      Delete\n",{"type":62,"tag":184,"props":1736,"children":1737},{"class":186,"line":989},[1738,1742,1746],{"type":62,"tag":184,"props":1739,"children":1740},{"style":197},[1741],{"type":67,"value":1157},{"type":62,"tag":184,"props":1743,"children":1744},{"style":333},[1745],{"type":67,"value":1658},{"type":62,"tag":184,"props":1747,"children":1748},{"style":197},[1749],{"type":67,"value":1018},{"type":62,"tag":184,"props":1751,"children":1752},{"class":186,"line":1002},[1753],{"type":62,"tag":184,"props":1754,"children":1755},{"style":333},[1756],{"type":67,"value":1174},{"type":62,"tag":184,"props":1758,"children":1759},{"class":186,"line":1021},[1760],{"type":62,"tag":184,"props":1761,"children":1762},{"style":197},[1763],{"type":67,"value":1148},{"type":62,"tag":166,"props":1765,"children":1767},{"id":1766},"cache-coherent-mutations",[1768],{"type":67,"value":1769},"Cache-Coherent Mutations",{"type":62,"tag":70,"props":1771,"children":1772},{},[1773],{"type":67,"value":1774},"Keep reads and writes behind server functions that use the same authoritative store. Await the write, then invalidate the route cache so its loader reads the persisted result:",{"type":62,"tag":173,"props":1776,"children":1778},{"className":175,"code":1777,"language":177,"meta":178,"style":178},"const listIssues = createServerFn({ method: 'GET' }).handler(() => {\n  return db.issues.findMany()\n})\n\nconst createIssue = createServerFn({ method: 'POST' })\n  .validator((data: unknown) => {\n    if (\n      typeof data !== 'object' ||\n      data === null ||\n      !('title' in data) ||\n      typeof data.title !== 'string' ||\n      data.title.trim().length === 0\n    ) {\n      throw new Error('Title is required')\n    }\n    return { title: data.title.trim() }\n  })\n  .handler(async ({ data }) => {\n    return db.issues.create({ data })\n  })\n\nexport const Route = createFileRoute('\u002Fissues')({\n  loader: () => listIssues(),\n  component: IssuesPage,\n})\n\nfunction IssuesPage() {\n  const router = useRouter()\n  const createIssueFn = useServerFn(createIssue)\n\n  const handleCreate = async (title: string) => {\n    await createIssueFn({ data: { title } })\n    await router.invalidate({ sync: true })\n  }\n\n  \u002F\u002F render Route.useLoaderData() and call handleCreate from the form\n}\n",[1779],{"type":62,"tag":76,"props":1780,"children":1781},{"__ignoreMap":178},[1782,1862,1895,1906,1913,1969,2013,2025,2060,2082,2125,2165,2212,2224,2263,2271,2320,2331,2370,2418,2429,2436,2484,2516,2537,2549,2557,2577,2603,2637,2645,2696,2744,2794,2803,2811,2820],{"type":62,"tag":184,"props":1783,"children":1784},{"class":186,"line":187},[1785,1789,1794,1798,1802,1806,1810,1814,1818,1822,1826,1830,1834,1838,1842,1846,1850,1854,1858],{"type":62,"tag":184,"props":1786,"children":1787},{"style":259},[1788],{"type":67,"value":262},{"type":62,"tag":184,"props":1790,"children":1791},{"style":203},[1792],{"type":67,"value":1793}," listIssues ",{"type":62,"tag":184,"props":1795,"children":1796},{"style":197},[1797],{"type":67,"value":272},{"type":62,"tag":184,"props":1799,"children":1800},{"style":275},[1801],{"type":67,"value":206},{"type":62,"tag":184,"props":1803,"children":1804},{"style":203},[1805],{"type":67,"value":297},{"type":62,"tag":184,"props":1807,"children":1808},{"style":197},[1809],{"type":67,"value":421},{"type":62,"tag":184,"props":1811,"children":1812},{"style":333},[1813],{"type":67,"value":426},{"type":62,"tag":184,"props":1815,"children":1816},{"style":197},[1817],{"type":67,"value":341},{"type":62,"tag":184,"props":1819,"children":1820},{"style":197},[1821],{"type":67,"value":221},{"type":62,"tag":184,"props":1823,"children":1824},{"style":224},[1825],{"type":67,"value":660},{"type":62,"tag":184,"props":1827,"children":1828},{"style":197},[1829],{"type":67,"value":355},{"type":62,"tag":184,"props":1831,"children":1832},{"style":197},[1833],{"type":67,"value":211},{"type":62,"tag":184,"props":1835,"children":1836},{"style":203},[1837],{"type":67,"value":452},{"type":62,"tag":184,"props":1839,"children":1840},{"style":197},[1841],{"type":67,"value":287},{"type":62,"tag":184,"props":1843,"children":1844},{"style":275},[1845],{"type":67,"value":292},{"type":62,"tag":184,"props":1847,"children":1848},{"style":203},[1849],{"type":67,"value":297},{"type":62,"tag":184,"props":1851,"children":1852},{"style":197},[1853],{"type":67,"value":282},{"type":62,"tag":184,"props":1855,"children":1856},{"style":259},[1857],{"type":67,"value":312},{"type":62,"tag":184,"props":1859,"children":1860},{"style":197},[1861],{"type":67,"value":317},{"type":62,"tag":184,"props":1863,"children":1864},{"class":186,"line":235},[1865,1869,1873,1877,1882,1886,1891],{"type":62,"tag":184,"props":1866,"children":1867},{"style":191},[1868],{"type":67,"value":326},{"type":62,"tag":184,"props":1870,"children":1871},{"style":203},[1872],{"type":67,"value":728},{"type":62,"tag":184,"props":1874,"children":1875},{"style":197},[1876],{"type":67,"value":287},{"type":62,"tag":184,"props":1878,"children":1879},{"style":203},[1880],{"type":67,"value":1881},"issues",{"type":62,"tag":184,"props":1883,"children":1884},{"style":197},[1885],{"type":67,"value":287},{"type":62,"tag":184,"props":1887,"children":1888},{"style":275},[1889],{"type":67,"value":1890},"findMany",{"type":62,"tag":184,"props":1892,"children":1893},{"style":333},[1894],{"type":67,"value":986},{"type":62,"tag":184,"props":1896,"children":1897},{"class":186,"line":245},[1898,1902],{"type":62,"tag":184,"props":1899,"children":1900},{"style":197},[1901],{"type":67,"value":369},{"type":62,"tag":184,"props":1903,"children":1904},{"style":203},[1905],{"type":67,"value":374},{"type":62,"tag":184,"props":1907,"children":1908},{"class":186,"line":255},[1909],{"type":62,"tag":184,"props":1910,"children":1911},{"emptyLinePlaceholder":239},[1912],{"type":67,"value":242},{"type":62,"tag":184,"props":1914,"children":1915},{"class":186,"line":320},[1916,1920,1925,1929,1933,1937,1941,1945,1949,1953,1957,1961,1965],{"type":62,"tag":184,"props":1917,"children":1918},{"style":259},[1919],{"type":67,"value":262},{"type":62,"tag":184,"props":1921,"children":1922},{"style":203},[1923],{"type":67,"value":1924}," createIssue ",{"type":62,"tag":184,"props":1926,"children":1927},{"style":197},[1928],{"type":67,"value":272},{"type":62,"tag":184,"props":1930,"children":1931},{"style":275},[1932],{"type":67,"value":206},{"type":62,"tag":184,"props":1934,"children":1935},{"style":203},[1936],{"type":67,"value":297},{"type":62,"tag":184,"props":1938,"children":1939},{"style":197},[1940],{"type":67,"value":421},{"type":62,"tag":184,"props":1942,"children":1943},{"style":333},[1944],{"type":67,"value":426},{"type":62,"tag":184,"props":1946,"children":1947},{"style":197},[1948],{"type":67,"value":341},{"type":62,"tag":184,"props":1950,"children":1951},{"style":197},[1952],{"type":67,"value":221},{"type":62,"tag":184,"props":1954,"children":1955},{"style":224},[1956],{"type":67,"value":439},{"type":62,"tag":184,"props":1958,"children":1959},{"style":197},[1960],{"type":67,"value":355},{"type":62,"tag":184,"props":1962,"children":1963},{"style":197},[1964],{"type":67,"value":211},{"type":62,"tag":184,"props":1966,"children":1967},{"style":203},[1968],{"type":67,"value":374},{"type":62,"tag":184,"props":1970,"children":1971},{"class":186,"line":363},[1972,1976,1980,1984,1988,1992,1996,2001,2005,2009],{"type":62,"tag":184,"props":1973,"children":1974},{"style":197},[1975],{"type":67,"value":1315},{"type":62,"tag":184,"props":1977,"children":1978},{"style":275},[1979],{"type":67,"value":1320},{"type":62,"tag":184,"props":1981,"children":1982},{"style":203},[1983],{"type":67,"value":297},{"type":62,"tag":184,"props":1985,"children":1986},{"style":197},[1987],{"type":67,"value":297},{"type":62,"tag":184,"props":1989,"children":1990},{"style":1052},[1991],{"type":67,"value":1333},{"type":62,"tag":184,"props":1993,"children":1994},{"style":197},[1995],{"type":67,"value":341},{"type":62,"tag":184,"props":1997,"children":1998},{"style":1353},[1999],{"type":67,"value":2000}," unknown",{"type":62,"tag":184,"props":2002,"children":2003},{"style":197},[2004],{"type":67,"value":452},{"type":62,"tag":184,"props":2006,"children":2007},{"style":259},[2008],{"type":67,"value":312},{"type":62,"tag":184,"props":2010,"children":2011},{"style":197},[2012],{"type":67,"value":317},{"type":62,"tag":184,"props":2014,"children":2015},{"class":186,"line":377},[2016,2021],{"type":62,"tag":184,"props":2017,"children":2018},{"style":191},[2019],{"type":67,"value":2020},"    if",{"type":62,"tag":184,"props":2022,"children":2023},{"style":333},[2024],{"type":67,"value":999},{"type":62,"tag":184,"props":2026,"children":2027},{"class":186,"line":385},[2028,2033,2037,2042,2046,2051,2055],{"type":62,"tag":184,"props":2029,"children":2030},{"style":197},[2031],{"type":67,"value":2032},"      typeof",{"type":62,"tag":184,"props":2034,"children":2035},{"style":203},[2036],{"type":67,"value":1399},{"type":62,"tag":184,"props":2038,"children":2039},{"style":197},[2040],{"type":67,"value":2041}," !==",{"type":62,"tag":184,"props":2043,"children":2044},{"style":197},[2045],{"type":67,"value":221},{"type":62,"tag":184,"props":2047,"children":2048},{"style":224},[2049],{"type":67,"value":2050},"object",{"type":62,"tag":184,"props":2052,"children":2053},{"style":197},[2054],{"type":67,"value":355},{"type":62,"tag":184,"props":2056,"children":2057},{"style":197},[2058],{"type":67,"value":2059}," ||\n",{"type":62,"tag":184,"props":2061,"children":2062},{"class":186,"line":394},[2063,2068,2073,2078],{"type":62,"tag":184,"props":2064,"children":2065},{"style":203},[2066],{"type":67,"value":2067},"      data",{"type":62,"tag":184,"props":2069,"children":2070},{"style":197},[2071],{"type":67,"value":2072}," ===",{"type":62,"tag":184,"props":2074,"children":2075},{"style":197},[2076],{"type":67,"value":2077}," null",{"type":62,"tag":184,"props":2079,"children":2080},{"style":197},[2081],{"type":67,"value":2059},{"type":62,"tag":184,"props":2083,"children":2084},{"class":186,"line":483},[2085,2090,2094,2098,2102,2106,2111,2115,2120],{"type":62,"tag":184,"props":2086,"children":2087},{"style":197},[2088],{"type":67,"value":2089},"      !",{"type":62,"tag":184,"props":2091,"children":2092},{"style":333},[2093],{"type":67,"value":297},{"type":62,"tag":184,"props":2095,"children":2096},{"style":197},[2097],{"type":67,"value":355},{"type":62,"tag":184,"props":2099,"children":2100},{"style":224},[2101],{"type":67,"value":1121},{"type":62,"tag":184,"props":2103,"children":2104},{"style":197},[2105],{"type":67,"value":355},{"type":62,"tag":184,"props":2107,"children":2108},{"style":197},[2109],{"type":67,"value":2110}," in",{"type":62,"tag":184,"props":2112,"children":2113},{"style":203},[2114],{"type":67,"value":1399},{"type":62,"tag":184,"props":2116,"children":2117},{"style":333},[2118],{"type":67,"value":2119},") ",{"type":62,"tag":184,"props":2121,"children":2122},{"style":197},[2123],{"type":67,"value":2124},"||\n",{"type":62,"tag":184,"props":2126,"children":2127},{"class":186,"line":514},[2128,2132,2136,2140,2144,2148,2152,2157,2161],{"type":62,"tag":184,"props":2129,"children":2130},{"style":197},[2131],{"type":67,"value":2032},{"type":62,"tag":184,"props":2133,"children":2134},{"style":203},[2135],{"type":67,"value":1399},{"type":62,"tag":184,"props":2137,"children":2138},{"style":197},[2139],{"type":67,"value":287},{"type":62,"tag":184,"props":2141,"children":2142},{"style":203},[2143],{"type":67,"value":1121},{"type":62,"tag":184,"props":2145,"children":2146},{"style":197},[2147],{"type":67,"value":2041},{"type":62,"tag":184,"props":2149,"children":2150},{"style":197},[2151],{"type":67,"value":221},{"type":62,"tag":184,"props":2153,"children":2154},{"style":224},[2155],{"type":67,"value":2156},"string",{"type":62,"tag":184,"props":2158,"children":2159},{"style":197},[2160],{"type":67,"value":355},{"type":62,"tag":184,"props":2162,"children":2163},{"style":197},[2164],{"type":67,"value":2059},{"type":62,"tag":184,"props":2166,"children":2167},{"class":186,"line":905},[2168,2172,2176,2180,2184,2189,2193,2197,2202,2206],{"type":62,"tag":184,"props":2169,"children":2170},{"style":203},[2171],{"type":67,"value":2067},{"type":62,"tag":184,"props":2173,"children":2174},{"style":197},[2175],{"type":67,"value":287},{"type":62,"tag":184,"props":2177,"children":2178},{"style":203},[2179],{"type":67,"value":1121},{"type":62,"tag":184,"props":2181,"children":2182},{"style":197},[2183],{"type":67,"value":287},{"type":62,"tag":184,"props":2185,"children":2186},{"style":275},[2187],{"type":67,"value":2188},"trim",{"type":62,"tag":184,"props":2190,"children":2191},{"style":333},[2192],{"type":67,"value":282},{"type":62,"tag":184,"props":2194,"children":2195},{"style":197},[2196],{"type":67,"value":287},{"type":62,"tag":184,"props":2198,"children":2199},{"style":203},[2200],{"type":67,"value":2201},"length",{"type":62,"tag":184,"props":2203,"children":2204},{"style":197},[2205],{"type":67,"value":2072},{"type":62,"tag":184,"props":2207,"children":2209},{"style":2208},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2210],{"type":67,"value":2211}," 0\n",{"type":62,"tag":184,"props":2213,"children":2214},{"class":186,"line":917},[2215,2220],{"type":62,"tag":184,"props":2216,"children":2217},{"style":333},[2218],{"type":67,"value":2219},"    ) ",{"type":62,"tag":184,"props":2221,"children":2222},{"style":197},[2223],{"type":67,"value":847},{"type":62,"tag":184,"props":2225,"children":2226},{"class":186,"line":925},[2227,2232,2237,2242,2246,2250,2255,2259],{"type":62,"tag":184,"props":2228,"children":2229},{"style":191},[2230],{"type":67,"value":2231},"      throw",{"type":62,"tag":184,"props":2233,"children":2234},{"style":197},[2235],{"type":67,"value":2236}," new",{"type":62,"tag":184,"props":2238,"children":2239},{"style":275},[2240],{"type":67,"value":2241}," Error",{"type":62,"tag":184,"props":2243,"children":2244},{"style":333},[2245],{"type":67,"value":297},{"type":62,"tag":184,"props":2247,"children":2248},{"style":197},[2249],{"type":67,"value":355},{"type":62,"tag":184,"props":2251,"children":2252},{"style":224},[2253],{"type":67,"value":2254},"Title is required",{"type":62,"tag":184,"props":2256,"children":2257},{"style":197},[2258],{"type":67,"value":355},{"type":62,"tag":184,"props":2260,"children":2261},{"style":333},[2262],{"type":67,"value":374},{"type":62,"tag":184,"props":2264,"children":2265},{"class":186,"line":946},[2266],{"type":62,"tag":184,"props":2267,"children":2268},{"style":197},[2269],{"type":67,"value":2270},"    }\n",{"type":62,"tag":184,"props":2272,"children":2273},{"class":186,"line":989},[2274,2278,2282,2287,2291,2295,2299,2303,2307,2311,2316],{"type":62,"tag":184,"props":2275,"children":2276},{"style":191},[2277],{"type":67,"value":1505},{"type":62,"tag":184,"props":2279,"children":2280},{"style":197},[2281],{"type":67,"value":200},{"type":62,"tag":184,"props":2283,"children":2284},{"style":333},[2285],{"type":67,"value":2286}," title",{"type":62,"tag":184,"props":2288,"children":2289},{"style":197},[2290],{"type":67,"value":341},{"type":62,"tag":184,"props":2292,"children":2293},{"style":203},[2294],{"type":67,"value":1399},{"type":62,"tag":184,"props":2296,"children":2297},{"style":197},[2298],{"type":67,"value":287},{"type":62,"tag":184,"props":2300,"children":2301},{"style":203},[2302],{"type":67,"value":1121},{"type":62,"tag":184,"props":2304,"children":2305},{"style":197},[2306],{"type":67,"value":287},{"type":62,"tag":184,"props":2308,"children":2309},{"style":275},[2310],{"type":67,"value":2188},{"type":62,"tag":184,"props":2312,"children":2313},{"style":333},[2314],{"type":67,"value":2315},"() ",{"type":62,"tag":184,"props":2317,"children":2318},{"style":197},[2319],{"type":67,"value":1148},{"type":62,"tag":184,"props":2321,"children":2322},{"class":186,"line":1002},[2323,2327],{"type":62,"tag":184,"props":2324,"children":2325},{"style":197},[2326],{"type":67,"value":1533},{"type":62,"tag":184,"props":2328,"children":2329},{"style":203},[2330],{"type":67,"value":374},{"type":62,"tag":184,"props":2332,"children":2333},{"class":186,"line":1021},[2334,2338,2342,2346,2350,2354,2358,2362,2366],{"type":62,"tag":184,"props":2335,"children":2336},{"style":197},[2337],{"type":67,"value":1315},{"type":62,"tag":184,"props":2339,"children":2340},{"style":275},[2341],{"type":67,"value":292},{"type":62,"tag":184,"props":2343,"children":2344},{"style":203},[2345],{"type":67,"value":297},{"type":62,"tag":184,"props":2347,"children":2348},{"style":259},[2349],{"type":67,"value":302},{"type":62,"tag":184,"props":2351,"children":2352},{"style":197},[2353],{"type":67,"value":1394},{"type":62,"tag":184,"props":2355,"children":2356},{"style":1052},[2357],{"type":67,"value":1399},{"type":62,"tag":184,"props":2359,"children":2360},{"style":197},[2361],{"type":67,"value":1361},{"type":62,"tag":184,"props":2363,"children":2364},{"style":259},[2365],{"type":67,"value":312},{"type":62,"tag":184,"props":2367,"children":2368},{"style":197},[2369],{"type":67,"value":317},{"type":62,"tag":184,"props":2371,"children":2372},{"class":186,"line":1069},[2373,2377,2381,2385,2389,2393,2398,2402,2406,2410,2414],{"type":62,"tag":184,"props":2374,"children":2375},{"style":191},[2376],{"type":67,"value":1505},{"type":62,"tag":184,"props":2378,"children":2379},{"style":203},[2380],{"type":67,"value":728},{"type":62,"tag":184,"props":2382,"children":2383},{"style":197},[2384],{"type":67,"value":287},{"type":62,"tag":184,"props":2386,"children":2387},{"style":203},[2388],{"type":67,"value":1881},{"type":62,"tag":184,"props":2390,"children":2391},{"style":197},[2392],{"type":67,"value":287},{"type":62,"tag":184,"props":2394,"children":2395},{"style":275},[2396],{"type":67,"value":2397},"create",{"type":62,"tag":184,"props":2399,"children":2400},{"style":333},[2401],{"type":67,"value":297},{"type":62,"tag":184,"props":2403,"children":2404},{"style":197},[2405],{"type":67,"value":421},{"type":62,"tag":184,"props":2407,"children":2408},{"style":203},[2409],{"type":67,"value":1399},{"type":62,"tag":184,"props":2411,"children":2412},{"style":197},[2413],{"type":67,"value":211},{"type":62,"tag":184,"props":2415,"children":2416},{"style":333},[2417],{"type":67,"value":374},{"type":62,"tag":184,"props":2419,"children":2420},{"class":186,"line":1137},[2421,2425],{"type":62,"tag":184,"props":2422,"children":2423},{"style":197},[2424],{"type":67,"value":1533},{"type":62,"tag":184,"props":2426,"children":2427},{"style":203},[2428],{"type":67,"value":374},{"type":62,"tag":184,"props":2430,"children":2431},{"class":186,"line":1151},[2432],{"type":62,"tag":184,"props":2433,"children":2434},{"emptyLinePlaceholder":239},[2435],{"type":67,"value":242},{"type":62,"tag":184,"props":2437,"children":2438},{"class":186,"line":1168},[2439,2443,2447,2451,2455,2459,2463,2467,2472,2476,2480],{"type":62,"tag":184,"props":2440,"children":2441},{"style":191},[2442],{"type":67,"value":803},{"type":62,"tag":184,"props":2444,"children":2445},{"style":259},[2446],{"type":67,"value":808},{"type":62,"tag":184,"props":2448,"children":2449},{"style":203},[2450],{"type":67,"value":105},{"type":62,"tag":184,"props":2452,"children":2453},{"style":197},[2454],{"type":67,"value":272},{"type":62,"tag":184,"props":2456,"children":2457},{"style":275},[2458],{"type":67,"value":552},{"type":62,"tag":184,"props":2460,"children":2461},{"style":203},[2462],{"type":67,"value":297},{"type":62,"tag":184,"props":2464,"children":2465},{"style":197},[2466],{"type":67,"value":355},{"type":62,"tag":184,"props":2468,"children":2469},{"style":224},[2470],{"type":67,"value":2471},"\u002Fissues",{"type":62,"tag":184,"props":2473,"children":2474},{"style":197},[2475],{"type":67,"value":355},{"type":62,"tag":184,"props":2477,"children":2478},{"style":203},[2479],{"type":67,"value":842},{"type":62,"tag":184,"props":2481,"children":2482},{"style":197},[2483],{"type":67,"value":847},{"type":62,"tag":184,"props":2485,"children":2486},{"class":186,"line":1177},[2487,2491,2495,2499,2503,2508,2512],{"type":62,"tag":184,"props":2488,"children":2489},{"style":275},[2490],{"type":67,"value":855},{"type":62,"tag":184,"props":2492,"children":2493},{"style":197},[2494],{"type":67,"value":341},{"type":62,"tag":184,"props":2496,"children":2497},{"style":197},[2498],{"type":67,"value":307},{"type":62,"tag":184,"props":2500,"children":2501},{"style":259},[2502],{"type":67,"value":312},{"type":62,"tag":184,"props":2504,"children":2505},{"style":275},[2506],{"type":67,"value":2507}," listIssues",{"type":62,"tag":184,"props":2509,"children":2510},{"style":203},[2511],{"type":67,"value":282},{"type":62,"tag":184,"props":2513,"children":2514},{"style":197},[2515],{"type":67,"value":881},{"type":62,"tag":184,"props":2517,"children":2519},{"class":186,"line":2518},24,[2520,2524,2528,2533],{"type":62,"tag":184,"props":2521,"children":2522},{"style":333},[2523],{"type":67,"value":889},{"type":62,"tag":184,"props":2525,"children":2526},{"style":197},[2527],{"type":67,"value":341},{"type":62,"tag":184,"props":2529,"children":2530},{"style":203},[2531],{"type":67,"value":2532}," IssuesPage",{"type":62,"tag":184,"props":2534,"children":2535},{"style":197},[2536],{"type":67,"value":881},{"type":62,"tag":184,"props":2538,"children":2540},{"class":186,"line":2539},25,[2541,2545],{"type":62,"tag":184,"props":2542,"children":2543},{"style":197},[2544],{"type":67,"value":369},{"type":62,"tag":184,"props":2546,"children":2547},{"style":203},[2548],{"type":67,"value":374},{"type":62,"tag":184,"props":2550,"children":2552},{"class":186,"line":2551},26,[2553],{"type":62,"tag":184,"props":2554,"children":2555},{"emptyLinePlaceholder":239},[2556],{"type":67,"value":242},{"type":62,"tag":184,"props":2558,"children":2560},{"class":186,"line":2559},27,[2561,2565,2569,2573],{"type":62,"tag":184,"props":2562,"children":2563},{"style":259},[2564],{"type":67,"value":931},{"type":62,"tag":184,"props":2566,"children":2567},{"style":275},[2568],{"type":67,"value":2532},{"type":62,"tag":184,"props":2570,"children":2571},{"style":197},[2572],{"type":67,"value":282},{"type":62,"tag":184,"props":2574,"children":2575},{"style":197},[2576],{"type":67,"value":317},{"type":62,"tag":184,"props":2578,"children":2580},{"class":186,"line":2579},28,[2581,2585,2590,2594,2599],{"type":62,"tag":184,"props":2582,"children":2583},{"style":259},[2584],{"type":67,"value":708},{"type":62,"tag":184,"props":2586,"children":2587},{"style":203},[2588],{"type":67,"value":2589}," router",{"type":62,"tag":184,"props":2591,"children":2592},{"style":197},[2593],{"type":67,"value":718},{"type":62,"tag":184,"props":2595,"children":2596},{"style":275},[2597],{"type":67,"value":2598}," useRouter",{"type":62,"tag":184,"props":2600,"children":2601},{"style":333},[2602],{"type":67,"value":986},{"type":62,"tag":184,"props":2604,"children":2606},{"class":186,"line":2605},29,[2607,2611,2616,2620,2624,2628,2633],{"type":62,"tag":184,"props":2608,"children":2609},{"style":259},[2610],{"type":67,"value":708},{"type":62,"tag":184,"props":2612,"children":2613},{"style":203},[2614],{"type":67,"value":2615}," createIssueFn",{"type":62,"tag":184,"props":2617,"children":2618},{"style":197},[2619],{"type":67,"value":718},{"type":62,"tag":184,"props":2621,"children":2622},{"style":275},[2623],{"type":67,"value":1224},{"type":62,"tag":184,"props":2625,"children":2626},{"style":333},[2627],{"type":67,"value":297},{"type":62,"tag":184,"props":2629,"children":2630},{"style":203},[2631],{"type":67,"value":2632},"createIssue",{"type":62,"tag":184,"props":2634,"children":2635},{"style":333},[2636],{"type":67,"value":374},{"type":62,"tag":184,"props":2638,"children":2640},{"class":186,"line":2639},30,[2641],{"type":62,"tag":184,"props":2642,"children":2643},{"emptyLinePlaceholder":239},[2644],{"type":67,"value":242},{"type":62,"tag":184,"props":2646,"children":2648},{"class":186,"line":2647},31,[2649,2653,2658,2662,2667,2672,2676,2680,2684,2688,2692],{"type":62,"tag":184,"props":2650,"children":2651},{"style":259},[2652],{"type":67,"value":708},{"type":62,"tag":184,"props":2654,"children":2655},{"style":203},[2656],{"type":67,"value":2657}," handleCreate",{"type":62,"tag":184,"props":2659,"children":2660},{"style":197},[2661],{"type":67,"value":718},{"type":62,"tag":184,"props":2663,"children":2664},{"style":259},[2665],{"type":67,"value":2666}," async",{"type":62,"tag":184,"props":2668,"children":2669},{"style":197},[2670],{"type":67,"value":2671}," (",{"type":62,"tag":184,"props":2673,"children":2674},{"style":1052},[2675],{"type":67,"value":1121},{"type":62,"tag":184,"props":2677,"children":2678},{"style":197},[2679],{"type":67,"value":341},{"type":62,"tag":184,"props":2681,"children":2682},{"style":1353},[2683],{"type":67,"value":1356},{"type":62,"tag":184,"props":2685,"children":2686},{"style":197},[2687],{"type":67,"value":452},{"type":62,"tag":184,"props":2689,"children":2690},{"style":259},[2691],{"type":67,"value":312},{"type":62,"tag":184,"props":2693,"children":2694},{"style":197},[2695],{"type":67,"value":317},{"type":62,"tag":184,"props":2697,"children":2699},{"class":186,"line":2698},32,[2700,2704,2708,2712,2716,2720,2724,2728,2732,2736,2740],{"type":62,"tag":184,"props":2701,"children":2702},{"style":191},[2703],{"type":67,"value":1419},{"type":62,"tag":184,"props":2705,"children":2706},{"style":275},[2707],{"type":67,"value":2615},{"type":62,"tag":184,"props":2709,"children":2710},{"style":333},[2711],{"type":67,"value":297},{"type":62,"tag":184,"props":2713,"children":2714},{"style":197},[2715],{"type":67,"value":421},{"type":62,"tag":184,"props":2717,"children":2718},{"style":333},[2719],{"type":67,"value":1399},{"type":62,"tag":184,"props":2721,"children":2722},{"style":197},[2723],{"type":67,"value":341},{"type":62,"tag":184,"props":2725,"children":2726},{"style":197},[2727],{"type":67,"value":200},{"type":62,"tag":184,"props":2729,"children":2730},{"style":203},[2731],{"type":67,"value":2286},{"type":62,"tag":184,"props":2733,"children":2734},{"style":197},[2735],{"type":67,"value":211},{"type":62,"tag":184,"props":2737,"children":2738},{"style":197},[2739],{"type":67,"value":211},{"type":62,"tag":184,"props":2741,"children":2742},{"style":333},[2743],{"type":67,"value":374},{"type":62,"tag":184,"props":2745,"children":2747},{"class":186,"line":2746},33,[2748,2752,2756,2760,2765,2769,2773,2778,2782,2786,2790],{"type":62,"tag":184,"props":2749,"children":2750},{"style":191},[2751],{"type":67,"value":1419},{"type":62,"tag":184,"props":2753,"children":2754},{"style":203},[2755],{"type":67,"value":2589},{"type":62,"tag":184,"props":2757,"children":2758},{"style":197},[2759],{"type":67,"value":287},{"type":62,"tag":184,"props":2761,"children":2762},{"style":275},[2763],{"type":67,"value":2764},"invalidate",{"type":62,"tag":184,"props":2766,"children":2767},{"style":333},[2768],{"type":67,"value":297},{"type":62,"tag":184,"props":2770,"children":2771},{"style":197},[2772],{"type":67,"value":421},{"type":62,"tag":184,"props":2774,"children":2775},{"style":333},[2776],{"type":67,"value":2777}," sync",{"type":62,"tag":184,"props":2779,"children":2780},{"style":197},[2781],{"type":67,"value":341},{"type":62,"tag":184,"props":2783,"children":2784},{"style":504},[2785],{"type":67,"value":507},{"type":62,"tag":184,"props":2787,"children":2788},{"style":197},[2789],{"type":67,"value":211},{"type":62,"tag":184,"props":2791,"children":2792},{"style":333},[2793],{"type":67,"value":374},{"type":62,"tag":184,"props":2795,"children":2797},{"class":186,"line":2796},34,[2798],{"type":62,"tag":184,"props":2799,"children":2800},{"style":197},[2801],{"type":67,"value":2802},"  }\n",{"type":62,"tag":184,"props":2804,"children":2806},{"class":186,"line":2805},35,[2807],{"type":62,"tag":184,"props":2808,"children":2809},{"emptyLinePlaceholder":239},[2810],{"type":67,"value":242},{"type":62,"tag":184,"props":2812,"children":2814},{"class":186,"line":2813},36,[2815],{"type":62,"tag":184,"props":2816,"children":2817},{"style":249},[2818],{"type":67,"value":2819},"  \u002F\u002F render Route.useLoaderData() and call handleCreate from the form\n",{"type":62,"tag":184,"props":2821,"children":2823},{"class":186,"line":2822},37,[2824],{"type":62,"tag":184,"props":2825,"children":2826},{"style":197},[2827],{"type":67,"value":1148},{"type":62,"tag":70,"props":2829,"children":2830},{},[2831],{"type":67,"value":2832},"Do not update only local component state after a persistent mutation. Verify the rendered list after create, update, delete, and a fresh page load.",{"type":62,"tag":166,"props":2834,"children":2836},{"id":2835},"input-validation",[2837],{"type":67,"value":2838},"Input Validation",{"type":62,"tag":2840,"props":2841,"children":2843},"h3",{"id":2842},"basic-validator",[2844],{"type":67,"value":2845},"Basic Validator",{"type":62,"tag":173,"props":2847,"children":2849},{"className":175,"code":2848,"language":177,"meta":178,"style":178},"const greetUser = createServerFn({ method: 'GET' })\n  .validator((data: { name: string }) => data)\n  .handler(async ({ data }) => {\n    return `Hello, ${data.name}!`\n  })\n\nawait greetUser({ data: { name: 'John' } })\n",[2850],{"type":62,"tag":76,"props":2851,"children":2852},{"__ignoreMap":178},[2853,2909,2965,3004,3053,3064,3071],{"type":62,"tag":184,"props":2854,"children":2855},{"class":186,"line":187},[2856,2860,2865,2869,2873,2877,2881,2885,2889,2893,2897,2901,2905],{"type":62,"tag":184,"props":2857,"children":2858},{"style":259},[2859],{"type":67,"value":262},{"type":62,"tag":184,"props":2861,"children":2862},{"style":203},[2863],{"type":67,"value":2864}," greetUser ",{"type":62,"tag":184,"props":2866,"children":2867},{"style":197},[2868],{"type":67,"value":272},{"type":62,"tag":184,"props":2870,"children":2871},{"style":275},[2872],{"type":67,"value":206},{"type":62,"tag":184,"props":2874,"children":2875},{"style":203},[2876],{"type":67,"value":297},{"type":62,"tag":184,"props":2878,"children":2879},{"style":197},[2880],{"type":67,"value":421},{"type":62,"tag":184,"props":2882,"children":2883},{"style":333},[2884],{"type":67,"value":426},{"type":62,"tag":184,"props":2886,"children":2887},{"style":197},[2888],{"type":67,"value":341},{"type":62,"tag":184,"props":2890,"children":2891},{"style":197},[2892],{"type":67,"value":221},{"type":62,"tag":184,"props":2894,"children":2895},{"style":224},[2896],{"type":67,"value":660},{"type":62,"tag":184,"props":2898,"children":2899},{"style":197},[2900],{"type":67,"value":355},{"type":62,"tag":184,"props":2902,"children":2903},{"style":197},[2904],{"type":67,"value":211},{"type":62,"tag":184,"props":2906,"children":2907},{"style":203},[2908],{"type":67,"value":374},{"type":62,"tag":184,"props":2910,"children":2911},{"class":186,"line":235},[2912,2916,2920,2924,2928,2932,2936,2940,2945,2949,2953,2957,2961],{"type":62,"tag":184,"props":2913,"children":2914},{"style":197},[2915],{"type":67,"value":1315},{"type":62,"tag":184,"props":2917,"children":2918},{"style":275},[2919],{"type":67,"value":1320},{"type":62,"tag":184,"props":2921,"children":2922},{"style":203},[2923],{"type":67,"value":297},{"type":62,"tag":184,"props":2925,"children":2926},{"style":197},[2927],{"type":67,"value":297},{"type":62,"tag":184,"props":2929,"children":2930},{"style":1052},[2931],{"type":67,"value":1333},{"type":62,"tag":184,"props":2933,"children":2934},{"style":197},[2935],{"type":67,"value":341},{"type":62,"tag":184,"props":2937,"children":2938},{"style":197},[2939],{"type":67,"value":200},{"type":62,"tag":184,"props":2941,"children":2942},{"style":333},[2943],{"type":67,"value":2944}," name",{"type":62,"tag":184,"props":2946,"children":2947},{"style":197},[2948],{"type":67,"value":341},{"type":62,"tag":184,"props":2950,"children":2951},{"style":1353},[2952],{"type":67,"value":1356},{"type":62,"tag":184,"props":2954,"children":2955},{"style":197},[2956],{"type":67,"value":1361},{"type":62,"tag":184,"props":2958,"children":2959},{"style":259},[2960],{"type":67,"value":312},{"type":62,"tag":184,"props":2962,"children":2963},{"style":203},[2964],{"type":67,"value":1370},{"type":62,"tag":184,"props":2966,"children":2967},{"class":186,"line":245},[2968,2972,2976,2980,2984,2988,2992,2996,3000],{"type":62,"tag":184,"props":2969,"children":2970},{"style":197},[2971],{"type":67,"value":1315},{"type":62,"tag":184,"props":2973,"children":2974},{"style":275},[2975],{"type":67,"value":292},{"type":62,"tag":184,"props":2977,"children":2978},{"style":203},[2979],{"type":67,"value":297},{"type":62,"tag":184,"props":2981,"children":2982},{"style":259},[2983],{"type":67,"value":302},{"type":62,"tag":184,"props":2985,"children":2986},{"style":197},[2987],{"type":67,"value":1394},{"type":62,"tag":184,"props":2989,"children":2990},{"style":1052},[2991],{"type":67,"value":1399},{"type":62,"tag":184,"props":2993,"children":2994},{"style":197},[2995],{"type":67,"value":1361},{"type":62,"tag":184,"props":2997,"children":2998},{"style":259},[2999],{"type":67,"value":312},{"type":62,"tag":184,"props":3001,"children":3002},{"style":197},[3003],{"type":67,"value":317},{"type":62,"tag":184,"props":3005,"children":3006},{"class":186,"line":255},[3007,3011,3016,3021,3026,3030,3034,3039,3043,3048],{"type":62,"tag":184,"props":3008,"children":3009},{"style":191},[3010],{"type":67,"value":1505},{"type":62,"tag":184,"props":3012,"children":3013},{"style":197},[3014],{"type":67,"value":3015}," `",{"type":62,"tag":184,"props":3017,"children":3018},{"style":224},[3019],{"type":67,"value":3020},"Hello, ",{"type":62,"tag":184,"props":3022,"children":3023},{"style":197},[3024],{"type":67,"value":3025},"${",{"type":62,"tag":184,"props":3027,"children":3028},{"style":203},[3029],{"type":67,"value":1333},{"type":62,"tag":184,"props":3031,"children":3032},{"style":197},[3033],{"type":67,"value":287},{"type":62,"tag":184,"props":3035,"children":3036},{"style":203},[3037],{"type":67,"value":3038},"name",{"type":62,"tag":184,"props":3040,"children":3041},{"style":197},[3042],{"type":67,"value":369},{"type":62,"tag":184,"props":3044,"children":3045},{"style":224},[3046],{"type":67,"value":3047},"!",{"type":62,"tag":184,"props":3049,"children":3050},{"style":197},[3051],{"type":67,"value":3052},"`\n",{"type":62,"tag":184,"props":3054,"children":3055},{"class":186,"line":320},[3056,3060],{"type":62,"tag":184,"props":3057,"children":3058},{"style":197},[3059],{"type":67,"value":1533},{"type":62,"tag":184,"props":3061,"children":3062},{"style":203},[3063],{"type":67,"value":374},{"type":62,"tag":184,"props":3065,"children":3066},{"class":186,"line":363},[3067],{"type":62,"tag":184,"props":3068,"children":3069},{"emptyLinePlaceholder":239},[3070],{"type":67,"value":242},{"type":62,"tag":184,"props":3072,"children":3073},{"class":186,"line":377},[3074,3079,3084,3088,3092,3096,3100,3104,3108,3112,3116,3121,3125,3129,3133],{"type":62,"tag":184,"props":3075,"children":3076},{"style":191},[3077],{"type":67,"value":3078},"await",{"type":62,"tag":184,"props":3080,"children":3081},{"style":275},[3082],{"type":67,"value":3083}," greetUser",{"type":62,"tag":184,"props":3085,"children":3086},{"style":203},[3087],{"type":67,"value":297},{"type":62,"tag":184,"props":3089,"children":3090},{"style":197},[3091],{"type":67,"value":421},{"type":62,"tag":184,"props":3093,"children":3094},{"style":333},[3095],{"type":67,"value":1399},{"type":62,"tag":184,"props":3097,"children":3098},{"style":197},[3099],{"type":67,"value":341},{"type":62,"tag":184,"props":3101,"children":3102},{"style":197},[3103],{"type":67,"value":200},{"type":62,"tag":184,"props":3105,"children":3106},{"style":333},[3107],{"type":67,"value":2944},{"type":62,"tag":184,"props":3109,"children":3110},{"style":197},[3111],{"type":67,"value":341},{"type":62,"tag":184,"props":3113,"children":3114},{"style":197},[3115],{"type":67,"value":221},{"type":62,"tag":184,"props":3117,"children":3118},{"style":224},[3119],{"type":67,"value":3120},"John",{"type":62,"tag":184,"props":3122,"children":3123},{"style":197},[3124],{"type":67,"value":355},{"type":62,"tag":184,"props":3126,"children":3127},{"style":197},[3128],{"type":67,"value":211},{"type":62,"tag":184,"props":3130,"children":3131},{"style":197},[3132],{"type":67,"value":211},{"type":62,"tag":184,"props":3134,"children":3135},{"style":203},[3136],{"type":67,"value":374},{"type":62,"tag":2840,"props":3138,"children":3140},{"id":3139},"zod-validator",[3141],{"type":67,"value":3142},"Zod Validator",{"type":62,"tag":173,"props":3144,"children":3146},{"className":175,"code":3145,"language":177,"meta":178,"style":178},"import { z } from 'zod'\n\nconst createUser = createServerFn({ method: 'POST' })\n  .validator(\n    z.object({\n      name: z.string().min(1),\n      age: z.number().min(0),\n    }),\n  )\n  .handler(async ({ data }) => {\n    return `Created user: ${data.name}, age ${data.age}`\n  })\n",[3147],{"type":62,"tag":76,"props":3148,"children":3149},{"__ignoreMap":178},[3150,3187,3194,3250,3266,3290,3344,3398,3414,3421,3460,3523],{"type":62,"tag":184,"props":3151,"children":3152},{"class":186,"line":187},[3153,3157,3161,3166,3170,3174,3178,3183],{"type":62,"tag":184,"props":3154,"children":3155},{"style":191},[3156],{"type":67,"value":194},{"type":62,"tag":184,"props":3158,"children":3159},{"style":197},[3160],{"type":67,"value":200},{"type":62,"tag":184,"props":3162,"children":3163},{"style":203},[3164],{"type":67,"value":3165}," z",{"type":62,"tag":184,"props":3167,"children":3168},{"style":197},[3169],{"type":67,"value":211},{"type":62,"tag":184,"props":3171,"children":3172},{"style":191},[3173],{"type":67,"value":216},{"type":62,"tag":184,"props":3175,"children":3176},{"style":197},[3177],{"type":67,"value":221},{"type":62,"tag":184,"props":3179,"children":3180},{"style":224},[3181],{"type":67,"value":3182},"zod",{"type":62,"tag":184,"props":3184,"children":3185},{"style":197},[3186],{"type":67,"value":232},{"type":62,"tag":184,"props":3188,"children":3189},{"class":186,"line":235},[3190],{"type":62,"tag":184,"props":3191,"children":3192},{"emptyLinePlaceholder":239},[3193],{"type":67,"value":242},{"type":62,"tag":184,"props":3195,"children":3196},{"class":186,"line":245},[3197,3201,3206,3210,3214,3218,3222,3226,3230,3234,3238,3242,3246],{"type":62,"tag":184,"props":3198,"children":3199},{"style":259},[3200],{"type":67,"value":262},{"type":62,"tag":184,"props":3202,"children":3203},{"style":203},[3204],{"type":67,"value":3205}," createUser ",{"type":62,"tag":184,"props":3207,"children":3208},{"style":197},[3209],{"type":67,"value":272},{"type":62,"tag":184,"props":3211,"children":3212},{"style":275},[3213],{"type":67,"value":206},{"type":62,"tag":184,"props":3215,"children":3216},{"style":203},[3217],{"type":67,"value":297},{"type":62,"tag":184,"props":3219,"children":3220},{"style":197},[3221],{"type":67,"value":421},{"type":62,"tag":184,"props":3223,"children":3224},{"style":333},[3225],{"type":67,"value":426},{"type":62,"tag":184,"props":3227,"children":3228},{"style":197},[3229],{"type":67,"value":341},{"type":62,"tag":184,"props":3231,"children":3232},{"style":197},[3233],{"type":67,"value":221},{"type":62,"tag":184,"props":3235,"children":3236},{"style":224},[3237],{"type":67,"value":439},{"type":62,"tag":184,"props":3239,"children":3240},{"style":197},[3241],{"type":67,"value":355},{"type":62,"tag":184,"props":3243,"children":3244},{"style":197},[3245],{"type":67,"value":211},{"type":62,"tag":184,"props":3247,"children":3248},{"style":203},[3249],{"type":67,"value":374},{"type":62,"tag":184,"props":3251,"children":3252},{"class":186,"line":255},[3253,3257,3261],{"type":62,"tag":184,"props":3254,"children":3255},{"style":197},[3256],{"type":67,"value":1315},{"type":62,"tag":184,"props":3258,"children":3259},{"style":275},[3260],{"type":67,"value":1320},{"type":62,"tag":184,"props":3262,"children":3263},{"style":203},[3264],{"type":67,"value":3265},"(\n",{"type":62,"tag":184,"props":3267,"children":3268},{"class":186,"line":320},[3269,3274,3278,3282,3286],{"type":62,"tag":184,"props":3270,"children":3271},{"style":203},[3272],{"type":67,"value":3273},"    z",{"type":62,"tag":184,"props":3275,"children":3276},{"style":197},[3277],{"type":67,"value":287},{"type":62,"tag":184,"props":3279,"children":3280},{"style":275},[3281],{"type":67,"value":2050},{"type":62,"tag":184,"props":3283,"children":3284},{"style":203},[3285],{"type":67,"value":297},{"type":62,"tag":184,"props":3287,"children":3288},{"style":197},[3289],{"type":67,"value":847},{"type":62,"tag":184,"props":3291,"children":3292},{"class":186,"line":363},[3293,3298,3302,3306,3310,3314,3318,3322,3327,3331,3336,3340],{"type":62,"tag":184,"props":3294,"children":3295},{"style":333},[3296],{"type":67,"value":3297},"      name",{"type":62,"tag":184,"props":3299,"children":3300},{"style":197},[3301],{"type":67,"value":341},{"type":62,"tag":184,"props":3303,"children":3304},{"style":203},[3305],{"type":67,"value":3165},{"type":62,"tag":184,"props":3307,"children":3308},{"style":197},[3309],{"type":67,"value":287},{"type":62,"tag":184,"props":3311,"children":3312},{"style":275},[3313],{"type":67,"value":2156},{"type":62,"tag":184,"props":3315,"children":3316},{"style":203},[3317],{"type":67,"value":282},{"type":62,"tag":184,"props":3319,"children":3320},{"style":197},[3321],{"type":67,"value":287},{"type":62,"tag":184,"props":3323,"children":3324},{"style":275},[3325],{"type":67,"value":3326},"min",{"type":62,"tag":184,"props":3328,"children":3329},{"style":203},[3330],{"type":67,"value":297},{"type":62,"tag":184,"props":3332,"children":3333},{"style":2208},[3334],{"type":67,"value":3335},"1",{"type":62,"tag":184,"props":3337,"children":3338},{"style":203},[3339],{"type":67,"value":452},{"type":62,"tag":184,"props":3341,"children":3342},{"style":197},[3343],{"type":67,"value":881},{"type":62,"tag":184,"props":3345,"children":3346},{"class":186,"line":377},[3347,3352,3356,3360,3364,3369,3373,3377,3381,3385,3390,3394],{"type":62,"tag":184,"props":3348,"children":3349},{"style":333},[3350],{"type":67,"value":3351},"      age",{"type":62,"tag":184,"props":3353,"children":3354},{"style":197},[3355],{"type":67,"value":341},{"type":62,"tag":184,"props":3357,"children":3358},{"style":203},[3359],{"type":67,"value":3165},{"type":62,"tag":184,"props":3361,"children":3362},{"style":197},[3363],{"type":67,"value":287},{"type":62,"tag":184,"props":3365,"children":3366},{"style":275},[3367],{"type":67,"value":3368},"number",{"type":62,"tag":184,"props":3370,"children":3371},{"style":203},[3372],{"type":67,"value":282},{"type":62,"tag":184,"props":3374,"children":3375},{"style":197},[3376],{"type":67,"value":287},{"type":62,"tag":184,"props":3378,"children":3379},{"style":275},[3380],{"type":67,"value":3326},{"type":62,"tag":184,"props":3382,"children":3383},{"style":203},[3384],{"type":67,"value":297},{"type":62,"tag":184,"props":3386,"children":3387},{"style":2208},[3388],{"type":67,"value":3389},"0",{"type":62,"tag":184,"props":3391,"children":3392},{"style":203},[3393],{"type":67,"value":452},{"type":62,"tag":184,"props":3395,"children":3396},{"style":197},[3397],{"type":67,"value":881},{"type":62,"tag":184,"props":3399,"children":3400},{"class":186,"line":385},[3401,3406,3410],{"type":62,"tag":184,"props":3402,"children":3403},{"style":197},[3404],{"type":67,"value":3405},"    }",{"type":62,"tag":184,"props":3407,"children":3408},{"style":203},[3409],{"type":67,"value":452},{"type":62,"tag":184,"props":3411,"children":3412},{"style":197},[3413],{"type":67,"value":881},{"type":62,"tag":184,"props":3415,"children":3416},{"class":186,"line":394},[3417],{"type":62,"tag":184,"props":3418,"children":3419},{"style":203},[3420],{"type":67,"value":1174},{"type":62,"tag":184,"props":3422,"children":3423},{"class":186,"line":483},[3424,3428,3432,3436,3440,3444,3448,3452,3456],{"type":62,"tag":184,"props":3425,"children":3426},{"style":197},[3427],{"type":67,"value":1315},{"type":62,"tag":184,"props":3429,"children":3430},{"style":275},[3431],{"type":67,"value":292},{"type":62,"tag":184,"props":3433,"children":3434},{"style":203},[3435],{"type":67,"value":297},{"type":62,"tag":184,"props":3437,"children":3438},{"style":259},[3439],{"type":67,"value":302},{"type":62,"tag":184,"props":3441,"children":3442},{"style":197},[3443],{"type":67,"value":1394},{"type":62,"tag":184,"props":3445,"children":3446},{"style":1052},[3447],{"type":67,"value":1399},{"type":62,"tag":184,"props":3449,"children":3450},{"style":197},[3451],{"type":67,"value":1361},{"type":62,"tag":184,"props":3453,"children":3454},{"style":259},[3455],{"type":67,"value":312},{"type":62,"tag":184,"props":3457,"children":3458},{"style":197},[3459],{"type":67,"value":317},{"type":62,"tag":184,"props":3461,"children":3462},{"class":186,"line":514},[3463,3467,3471,3476,3480,3484,3488,3492,3496,3501,3505,3509,3513,3518],{"type":62,"tag":184,"props":3464,"children":3465},{"style":191},[3466],{"type":67,"value":1505},{"type":62,"tag":184,"props":3468,"children":3469},{"style":197},[3470],{"type":67,"value":3015},{"type":62,"tag":184,"props":3472,"children":3473},{"style":224},[3474],{"type":67,"value":3475},"Created user: ",{"type":62,"tag":184,"props":3477,"children":3478},{"style":197},[3479],{"type":67,"value":3025},{"type":62,"tag":184,"props":3481,"children":3482},{"style":203},[3483],{"type":67,"value":1333},{"type":62,"tag":184,"props":3485,"children":3486},{"style":197},[3487],{"type":67,"value":287},{"type":62,"tag":184,"props":3489,"children":3490},{"style":203},[3491],{"type":67,"value":3038},{"type":62,"tag":184,"props":3493,"children":3494},{"style":197},[3495],{"type":67,"value":369},{"type":62,"tag":184,"props":3497,"children":3498},{"style":224},[3499],{"type":67,"value":3500},", age ",{"type":62,"tag":184,"props":3502,"children":3503},{"style":197},[3504],{"type":67,"value":3025},{"type":62,"tag":184,"props":3506,"children":3507},{"style":203},[3508],{"type":67,"value":1333},{"type":62,"tag":184,"props":3510,"children":3511},{"style":197},[3512],{"type":67,"value":287},{"type":62,"tag":184,"props":3514,"children":3515},{"style":203},[3516],{"type":67,"value":3517},"age",{"type":62,"tag":184,"props":3519,"children":3520},{"style":197},[3521],{"type":67,"value":3522},"}`\n",{"type":62,"tag":184,"props":3524,"children":3525},{"class":186,"line":905},[3526,3530],{"type":62,"tag":184,"props":3527,"children":3528},{"style":197},[3529],{"type":67,"value":1533},{"type":62,"tag":184,"props":3531,"children":3532},{"style":203},[3533],{"type":67,"value":374},{"type":62,"tag":70,"props":3535,"children":3536},{},[3537],{"type":67,"value":3538},"Input validation does not validate output serialization. When a response schema changes, update the database selection, service return value, server-function result, loader consumer, and UI. Add a runtime test that calls the handler or HTTP boundary and asserts the new field in the returned payload.",{"type":62,"tag":2840,"props":3540,"children":3542},{"id":3541},"formdata",[3543],{"type":67,"value":3544},"FormData",{"type":62,"tag":173,"props":3546,"children":3548},{"className":175,"code":3547,"language":177,"meta":178,"style":178},"const submitForm = createServerFn({ method: 'POST' })\n  .validator((data) => {\n    if (!(data instanceof FormData)) {\n      throw new Error('Expected FormData')\n    }\n    return {\n      name: data.get('name')?.toString() || '',\n      email: data.get('email')?.toString() || '',\n    }\n  })\n  .handler(async ({ data }) => {\n    return { success: true }\n  })\n",[3549],{"type":62,"tag":76,"props":3550,"children":3551},{"__ignoreMap":178},[3552,3608,3643,3685,3721,3728,3739,3811,3880,3887,3898,3937,3964],{"type":62,"tag":184,"props":3553,"children":3554},{"class":186,"line":187},[3555,3559,3564,3568,3572,3576,3580,3584,3588,3592,3596,3600,3604],{"type":62,"tag":184,"props":3556,"children":3557},{"style":259},[3558],{"type":67,"value":262},{"type":62,"tag":184,"props":3560,"children":3561},{"style":203},[3562],{"type":67,"value":3563}," submitForm ",{"type":62,"tag":184,"props":3565,"children":3566},{"style":197},[3567],{"type":67,"value":272},{"type":62,"tag":184,"props":3569,"children":3570},{"style":275},[3571],{"type":67,"value":206},{"type":62,"tag":184,"props":3573,"children":3574},{"style":203},[3575],{"type":67,"value":297},{"type":62,"tag":184,"props":3577,"children":3578},{"style":197},[3579],{"type":67,"value":421},{"type":62,"tag":184,"props":3581,"children":3582},{"style":333},[3583],{"type":67,"value":426},{"type":62,"tag":184,"props":3585,"children":3586},{"style":197},[3587],{"type":67,"value":341},{"type":62,"tag":184,"props":3589,"children":3590},{"style":197},[3591],{"type":67,"value":221},{"type":62,"tag":184,"props":3593,"children":3594},{"style":224},[3595],{"type":67,"value":439},{"type":62,"tag":184,"props":3597,"children":3598},{"style":197},[3599],{"type":67,"value":355},{"type":62,"tag":184,"props":3601,"children":3602},{"style":197},[3603],{"type":67,"value":211},{"type":62,"tag":184,"props":3605,"children":3606},{"style":203},[3607],{"type":67,"value":374},{"type":62,"tag":184,"props":3609,"children":3610},{"class":186,"line":235},[3611,3615,3619,3623,3627,3631,3635,3639],{"type":62,"tag":184,"props":3612,"children":3613},{"style":197},[3614],{"type":67,"value":1315},{"type":62,"tag":184,"props":3616,"children":3617},{"style":275},[3618],{"type":67,"value":1320},{"type":62,"tag":184,"props":3620,"children":3621},{"style":203},[3622],{"type":67,"value":297},{"type":62,"tag":184,"props":3624,"children":3625},{"style":197},[3626],{"type":67,"value":297},{"type":62,"tag":184,"props":3628,"children":3629},{"style":1052},[3630],{"type":67,"value":1333},{"type":62,"tag":184,"props":3632,"children":3633},{"style":197},[3634],{"type":67,"value":452},{"type":62,"tag":184,"props":3636,"children":3637},{"style":259},[3638],{"type":67,"value":312},{"type":62,"tag":184,"props":3640,"children":3641},{"style":197},[3642],{"type":67,"value":317},{"type":62,"tag":184,"props":3644,"children":3645},{"class":186,"line":245},[3646,3650,3654,3658,3662,3666,3671,3676,3681],{"type":62,"tag":184,"props":3647,"children":3648},{"style":191},[3649],{"type":67,"value":2020},{"type":62,"tag":184,"props":3651,"children":3652},{"style":333},[3653],{"type":67,"value":2671},{"type":62,"tag":184,"props":3655,"children":3656},{"style":197},[3657],{"type":67,"value":3047},{"type":62,"tag":184,"props":3659,"children":3660},{"style":333},[3661],{"type":67,"value":297},{"type":62,"tag":184,"props":3663,"children":3664},{"style":203},[3665],{"type":67,"value":1333},{"type":62,"tag":184,"props":3667,"children":3668},{"style":197},[3669],{"type":67,"value":3670}," instanceof",{"type":62,"tag":184,"props":3672,"children":3673},{"style":1353},[3674],{"type":67,"value":3675}," FormData",{"type":62,"tag":184,"props":3677,"children":3678},{"style":333},[3679],{"type":67,"value":3680},")) ",{"type":62,"tag":184,"props":3682,"children":3683},{"style":197},[3684],{"type":67,"value":847},{"type":62,"tag":184,"props":3686,"children":3687},{"class":186,"line":255},[3688,3692,3696,3700,3704,3708,3713,3717],{"type":62,"tag":184,"props":3689,"children":3690},{"style":191},[3691],{"type":67,"value":2231},{"type":62,"tag":184,"props":3693,"children":3694},{"style":197},[3695],{"type":67,"value":2236},{"type":62,"tag":184,"props":3697,"children":3698},{"style":275},[3699],{"type":67,"value":2241},{"type":62,"tag":184,"props":3701,"children":3702},{"style":333},[3703],{"type":67,"value":297},{"type":62,"tag":184,"props":3705,"children":3706},{"style":197},[3707],{"type":67,"value":355},{"type":62,"tag":184,"props":3709,"children":3710},{"style":224},[3711],{"type":67,"value":3712},"Expected FormData",{"type":62,"tag":184,"props":3714,"children":3715},{"style":197},[3716],{"type":67,"value":355},{"type":62,"tag":184,"props":3718,"children":3719},{"style":333},[3720],{"type":67,"value":374},{"type":62,"tag":184,"props":3722,"children":3723},{"class":186,"line":320},[3724],{"type":62,"tag":184,"props":3725,"children":3726},{"style":197},[3727],{"type":67,"value":2270},{"type":62,"tag":184,"props":3729,"children":3730},{"class":186,"line":363},[3731,3735],{"type":62,"tag":184,"props":3732,"children":3733},{"style":191},[3734],{"type":67,"value":1505},{"type":62,"tag":184,"props":3736,"children":3737},{"style":197},[3738],{"type":67,"value":317},{"type":62,"tag":184,"props":3740,"children":3741},{"class":186,"line":377},[3742,3746,3750,3754,3758,3763,3767,3771,3775,3779,3783,3788,3793,3797,3802,3807],{"type":62,"tag":184,"props":3743,"children":3744},{"style":333},[3745],{"type":67,"value":3297},{"type":62,"tag":184,"props":3747,"children":3748},{"style":197},[3749],{"type":67,"value":341},{"type":62,"tag":184,"props":3751,"children":3752},{"style":203},[3753],{"type":67,"value":1399},{"type":62,"tag":184,"props":3755,"children":3756},{"style":197},[3757],{"type":67,"value":287},{"type":62,"tag":184,"props":3759,"children":3760},{"style":275},[3761],{"type":67,"value":3762},"get",{"type":62,"tag":184,"props":3764,"children":3765},{"style":333},[3766],{"type":67,"value":297},{"type":62,"tag":184,"props":3768,"children":3769},{"style":197},[3770],{"type":67,"value":355},{"type":62,"tag":184,"props":3772,"children":3773},{"style":224},[3774],{"type":67,"value":3038},{"type":62,"tag":184,"props":3776,"children":3777},{"style":197},[3778],{"type":67,"value":355},{"type":62,"tag":184,"props":3780,"children":3781},{"style":333},[3782],{"type":67,"value":452},{"type":62,"tag":184,"props":3784,"children":3785},{"style":197},[3786],{"type":67,"value":3787},"?.",{"type":62,"tag":184,"props":3789,"children":3790},{"style":275},[3791],{"type":67,"value":3792},"toString",{"type":62,"tag":184,"props":3794,"children":3795},{"style":333},[3796],{"type":67,"value":2315},{"type":62,"tag":184,"props":3798,"children":3799},{"style":197},[3800],{"type":67,"value":3801},"||",{"type":62,"tag":184,"props":3803,"children":3804},{"style":197},[3805],{"type":67,"value":3806}," ''",{"type":62,"tag":184,"props":3808,"children":3809},{"style":197},[3810],{"type":67,"value":881},{"type":62,"tag":184,"props":3812,"children":3813},{"class":186,"line":385},[3814,3819,3823,3827,3831,3835,3839,3843,3848,3852,3856,3860,3864,3868,3872,3876],{"type":62,"tag":184,"props":3815,"children":3816},{"style":333},[3817],{"type":67,"value":3818},"      email",{"type":62,"tag":184,"props":3820,"children":3821},{"style":197},[3822],{"type":67,"value":341},{"type":62,"tag":184,"props":3824,"children":3825},{"style":203},[3826],{"type":67,"value":1399},{"type":62,"tag":184,"props":3828,"children":3829},{"style":197},[3830],{"type":67,"value":287},{"type":62,"tag":184,"props":3832,"children":3833},{"style":275},[3834],{"type":67,"value":3762},{"type":62,"tag":184,"props":3836,"children":3837},{"style":333},[3838],{"type":67,"value":297},{"type":62,"tag":184,"props":3840,"children":3841},{"style":197},[3842],{"type":67,"value":355},{"type":62,"tag":184,"props":3844,"children":3845},{"style":224},[3846],{"type":67,"value":3847},"email",{"type":62,"tag":184,"props":3849,"children":3850},{"style":197},[3851],{"type":67,"value":355},{"type":62,"tag":184,"props":3853,"children":3854},{"style":333},[3855],{"type":67,"value":452},{"type":62,"tag":184,"props":3857,"children":3858},{"style":197},[3859],{"type":67,"value":3787},{"type":62,"tag":184,"props":3861,"children":3862},{"style":275},[3863],{"type":67,"value":3792},{"type":62,"tag":184,"props":3865,"children":3866},{"style":333},[3867],{"type":67,"value":2315},{"type":62,"tag":184,"props":3869,"children":3870},{"style":197},[3871],{"type":67,"value":3801},{"type":62,"tag":184,"props":3873,"children":3874},{"style":197},[3875],{"type":67,"value":3806},{"type":62,"tag":184,"props":3877,"children":3878},{"style":197},[3879],{"type":67,"value":881},{"type":62,"tag":184,"props":3881,"children":3882},{"class":186,"line":394},[3883],{"type":62,"tag":184,"props":3884,"children":3885},{"style":197},[3886],{"type":67,"value":2270},{"type":62,"tag":184,"props":3888,"children":3889},{"class":186,"line":483},[3890,3894],{"type":62,"tag":184,"props":3891,"children":3892},{"style":197},[3893],{"type":67,"value":1533},{"type":62,"tag":184,"props":3895,"children":3896},{"style":203},[3897],{"type":67,"value":374},{"type":62,"tag":184,"props":3899,"children":3900},{"class":186,"line":514},[3901,3905,3909,3913,3917,3921,3925,3929,3933],{"type":62,"tag":184,"props":3902,"children":3903},{"style":197},[3904],{"type":67,"value":1315},{"type":62,"tag":184,"props":3906,"children":3907},{"style":275},[3908],{"type":67,"value":292},{"type":62,"tag":184,"props":3910,"children":3911},{"style":203},[3912],{"type":67,"value":297},{"type":62,"tag":184,"props":3914,"children":3915},{"style":259},[3916],{"type":67,"value":302},{"type":62,"tag":184,"props":3918,"children":3919},{"style":197},[3920],{"type":67,"value":1394},{"type":62,"tag":184,"props":3922,"children":3923},{"style":1052},[3924],{"type":67,"value":1399},{"type":62,"tag":184,"props":3926,"children":3927},{"style":197},[3928],{"type":67,"value":1361},{"type":62,"tag":184,"props":3930,"children":3931},{"style":259},[3932],{"type":67,"value":312},{"type":62,"tag":184,"props":3934,"children":3935},{"style":197},[3936],{"type":67,"value":317},{"type":62,"tag":184,"props":3938,"children":3939},{"class":186,"line":905},[3940,3944,3948,3952,3956,3960],{"type":62,"tag":184,"props":3941,"children":3942},{"style":191},[3943],{"type":67,"value":1505},{"type":62,"tag":184,"props":3945,"children":3946},{"style":197},[3947],{"type":67,"value":200},{"type":62,"tag":184,"props":3949,"children":3950},{"style":333},[3951],{"type":67,"value":497},{"type":62,"tag":184,"props":3953,"children":3954},{"style":197},[3955],{"type":67,"value":341},{"type":62,"tag":184,"props":3957,"children":3958},{"style":504},[3959],{"type":67,"value":507},{"type":62,"tag":184,"props":3961,"children":3962},{"style":197},[3963],{"type":67,"value":360},{"type":62,"tag":184,"props":3965,"children":3966},{"class":186,"line":917},[3967,3971],{"type":62,"tag":184,"props":3968,"children":3969},{"style":197},[3970],{"type":67,"value":1533},{"type":62,"tag":184,"props":3972,"children":3973},{"style":203},[3974],{"type":67,"value":374},{"type":62,"tag":166,"props":3976,"children":3978},{"id":3977},"error-handling",[3979],{"type":67,"value":3980},"Error Handling",{"type":62,"tag":2840,"props":3982,"children":3984},{"id":3983},"errors",[3985],{"type":67,"value":3986},"Errors",{"type":62,"tag":173,"props":3988,"children":3990},{"className":175,"code":3989,"language":177,"meta":178,"style":178},"const riskyFunction = createServerFn().handler(async () => {\n  throw new Error('Something went wrong!')\n})\n\ntry {\n  await riskyFunction()\n} catch (error) {\n  console.log(error.message) \u002F\u002F \"Something went wrong!\"\n}\n",[3991],{"type":62,"tag":76,"props":3992,"children":3993},{"__ignoreMap":178},[3994,4046,4083,4094,4101,4113,4130,4151,4195],{"type":62,"tag":184,"props":3995,"children":3996},{"class":186,"line":187},[3997,4001,4006,4010,4014,4018,4022,4026,4030,4034,4038,4042],{"type":62,"tag":184,"props":3998,"children":3999},{"style":259},[4000],{"type":67,"value":262},{"type":62,"tag":184,"props":4002,"children":4003},{"style":203},[4004],{"type":67,"value":4005}," riskyFunction ",{"type":62,"tag":184,"props":4007,"children":4008},{"style":197},[4009],{"type":67,"value":272},{"type":62,"tag":184,"props":4011,"children":4012},{"style":275},[4013],{"type":67,"value":206},{"type":62,"tag":184,"props":4015,"children":4016},{"style":203},[4017],{"type":67,"value":282},{"type":62,"tag":184,"props":4019,"children":4020},{"style":197},[4021],{"type":67,"value":287},{"type":62,"tag":184,"props":4023,"children":4024},{"style":275},[4025],{"type":67,"value":292},{"type":62,"tag":184,"props":4027,"children":4028},{"style":203},[4029],{"type":67,"value":297},{"type":62,"tag":184,"props":4031,"children":4032},{"style":259},[4033],{"type":67,"value":302},{"type":62,"tag":184,"props":4035,"children":4036},{"style":197},[4037],{"type":67,"value":307},{"type":62,"tag":184,"props":4039,"children":4040},{"style":259},[4041],{"type":67,"value":312},{"type":62,"tag":184,"props":4043,"children":4044},{"style":197},[4045],{"type":67,"value":317},{"type":62,"tag":184,"props":4047,"children":4048},{"class":186,"line":235},[4049,4054,4058,4062,4066,4070,4075,4079],{"type":62,"tag":184,"props":4050,"children":4051},{"style":191},[4052],{"type":67,"value":4053},"  throw",{"type":62,"tag":184,"props":4055,"children":4056},{"style":197},[4057],{"type":67,"value":2236},{"type":62,"tag":184,"props":4059,"children":4060},{"style":275},[4061],{"type":67,"value":2241},{"type":62,"tag":184,"props":4063,"children":4064},{"style":333},[4065],{"type":67,"value":297},{"type":62,"tag":184,"props":4067,"children":4068},{"style":197},[4069],{"type":67,"value":355},{"type":62,"tag":184,"props":4071,"children":4072},{"style":224},[4073],{"type":67,"value":4074},"Something went wrong!",{"type":62,"tag":184,"props":4076,"children":4077},{"style":197},[4078],{"type":67,"value":355},{"type":62,"tag":184,"props":4080,"children":4081},{"style":333},[4082],{"type":67,"value":374},{"type":62,"tag":184,"props":4084,"children":4085},{"class":186,"line":245},[4086,4090],{"type":62,"tag":184,"props":4087,"children":4088},{"style":197},[4089],{"type":67,"value":369},{"type":62,"tag":184,"props":4091,"children":4092},{"style":203},[4093],{"type":67,"value":374},{"type":62,"tag":184,"props":4095,"children":4096},{"class":186,"line":255},[4097],{"type":62,"tag":184,"props":4098,"children":4099},{"emptyLinePlaceholder":239},[4100],{"type":67,"value":242},{"type":62,"tag":184,"props":4102,"children":4103},{"class":186,"line":320},[4104,4109],{"type":62,"tag":184,"props":4105,"children":4106},{"style":191},[4107],{"type":67,"value":4108},"try",{"type":62,"tag":184,"props":4110,"children":4111},{"style":197},[4112],{"type":67,"value":317},{"type":62,"tag":184,"props":4114,"children":4115},{"class":186,"line":363},[4116,4121,4126],{"type":62,"tag":184,"props":4117,"children":4118},{"style":191},[4119],{"type":67,"value":4120},"  await",{"type":62,"tag":184,"props":4122,"children":4123},{"style":275},[4124],{"type":67,"value":4125}," riskyFunction",{"type":62,"tag":184,"props":4127,"children":4128},{"style":333},[4129],{"type":67,"value":986},{"type":62,"tag":184,"props":4131,"children":4132},{"class":186,"line":377},[4133,4137,4142,4147],{"type":62,"tag":184,"props":4134,"children":4135},{"style":197},[4136],{"type":67,"value":369},{"type":62,"tag":184,"props":4138,"children":4139},{"style":191},[4140],{"type":67,"value":4141}," catch",{"type":62,"tag":184,"props":4143,"children":4144},{"style":203},[4145],{"type":67,"value":4146}," (error) ",{"type":62,"tag":184,"props":4148,"children":4149},{"style":197},[4150],{"type":67,"value":847},{"type":62,"tag":184,"props":4152,"children":4153},{"class":186,"line":385},[4154,4159,4163,4168,4172,4177,4181,4186,4190],{"type":62,"tag":184,"props":4155,"children":4156},{"style":203},[4157],{"type":67,"value":4158},"  console",{"type":62,"tag":184,"props":4160,"children":4161},{"style":197},[4162],{"type":67,"value":287},{"type":62,"tag":184,"props":4164,"children":4165},{"style":275},[4166],{"type":67,"value":4167},"log",{"type":62,"tag":184,"props":4169,"children":4170},{"style":333},[4171],{"type":67,"value":297},{"type":62,"tag":184,"props":4173,"children":4174},{"style":203},[4175],{"type":67,"value":4176},"error",{"type":62,"tag":184,"props":4178,"children":4179},{"style":197},[4180],{"type":67,"value":287},{"type":62,"tag":184,"props":4182,"children":4183},{"style":203},[4184],{"type":67,"value":4185},"message",{"type":62,"tag":184,"props":4187,"children":4188},{"style":333},[4189],{"type":67,"value":2119},{"type":62,"tag":184,"props":4191,"children":4192},{"style":249},[4193],{"type":67,"value":4194},"\u002F\u002F \"Something went wrong!\"\n",{"type":62,"tag":184,"props":4196,"children":4197},{"class":186,"line":394},[4198],{"type":62,"tag":184,"props":4199,"children":4200},{"style":197},[4201],{"type":67,"value":1148},{"type":62,"tag":2840,"props":4203,"children":4205},{"id":4204},"redirects",[4206],{"type":67,"value":4207},"Redirects",{"type":62,"tag":173,"props":4209,"children":4211},{"className":175,"code":4210,"language":177,"meta":178,"style":178},"import { redirect } from '@tanstack\u002Freact-router'\n\nconst requireAuth = createServerFn().handler(async () => {\n  const user = await getCurrentUser()\n  if (!user) {\n    throw redirect({ to: '\u002Flogin' })\n  }\n  return user\n})\n",[4212],{"type":62,"tag":76,"props":4213,"children":4214},{"__ignoreMap":178},[4215,4251,4258,4310,4339,4368,4418,4425,4437],{"type":62,"tag":184,"props":4216,"children":4217},{"class":186,"line":187},[4218,4222,4226,4231,4235,4239,4243,4247],{"type":62,"tag":184,"props":4219,"children":4220},{"style":191},[4221],{"type":67,"value":194},{"type":62,"tag":184,"props":4223,"children":4224},{"style":197},[4225],{"type":67,"value":200},{"type":62,"tag":184,"props":4227,"children":4228},{"style":203},[4229],{"type":67,"value":4230}," redirect",{"type":62,"tag":184,"props":4232,"children":4233},{"style":197},[4234],{"type":67,"value":211},{"type":62,"tag":184,"props":4236,"children":4237},{"style":191},[4238],{"type":67,"value":216},{"type":62,"tag":184,"props":4240,"children":4241},{"style":197},[4242],{"type":67,"value":221},{"type":62,"tag":184,"props":4244,"children":4245},{"style":224},[4246],{"type":67,"value":569},{"type":62,"tag":184,"props":4248,"children":4249},{"style":197},[4250],{"type":67,"value":232},{"type":62,"tag":184,"props":4252,"children":4253},{"class":186,"line":235},[4254],{"type":62,"tag":184,"props":4255,"children":4256},{"emptyLinePlaceholder":239},[4257],{"type":67,"value":242},{"type":62,"tag":184,"props":4259,"children":4260},{"class":186,"line":245},[4261,4265,4270,4274,4278,4282,4286,4290,4294,4298,4302,4306],{"type":62,"tag":184,"props":4262,"children":4263},{"style":259},[4264],{"type":67,"value":262},{"type":62,"tag":184,"props":4266,"children":4267},{"style":203},[4268],{"type":67,"value":4269}," requireAuth ",{"type":62,"tag":184,"props":4271,"children":4272},{"style":197},[4273],{"type":67,"value":272},{"type":62,"tag":184,"props":4275,"children":4276},{"style":275},[4277],{"type":67,"value":206},{"type":62,"tag":184,"props":4279,"children":4280},{"style":203},[4281],{"type":67,"value":282},{"type":62,"tag":184,"props":4283,"children":4284},{"style":197},[4285],{"type":67,"value":287},{"type":62,"tag":184,"props":4287,"children":4288},{"style":275},[4289],{"type":67,"value":292},{"type":62,"tag":184,"props":4291,"children":4292},{"style":203},[4293],{"type":67,"value":297},{"type":62,"tag":184,"props":4295,"children":4296},{"style":259},[4297],{"type":67,"value":302},{"type":62,"tag":184,"props":4299,"children":4300},{"style":197},[4301],{"type":67,"value":307},{"type":62,"tag":184,"props":4303,"children":4304},{"style":259},[4305],{"type":67,"value":312},{"type":62,"tag":184,"props":4307,"children":4308},{"style":197},[4309],{"type":67,"value":317},{"type":62,"tag":184,"props":4311,"children":4312},{"class":186,"line":255},[4313,4317,4322,4326,4330,4335],{"type":62,"tag":184,"props":4314,"children":4315},{"style":259},[4316],{"type":67,"value":708},{"type":62,"tag":184,"props":4318,"children":4319},{"style":203},[4320],{"type":67,"value":4321}," user",{"type":62,"tag":184,"props":4323,"children":4324},{"style":197},[4325],{"type":67,"value":718},{"type":62,"tag":184,"props":4327,"children":4328},{"style":191},[4329],{"type":67,"value":723},{"type":62,"tag":184,"props":4331,"children":4332},{"style":275},[4333],{"type":67,"value":4334}," getCurrentUser",{"type":62,"tag":184,"props":4336,"children":4337},{"style":333},[4338],{"type":67,"value":986},{"type":62,"tag":184,"props":4340,"children":4341},{"class":186,"line":320},[4342,4347,4351,4355,4360,4364],{"type":62,"tag":184,"props":4343,"children":4344},{"style":191},[4345],{"type":67,"value":4346},"  if",{"type":62,"tag":184,"props":4348,"children":4349},{"style":333},[4350],{"type":67,"value":2671},{"type":62,"tag":184,"props":4352,"children":4353},{"style":197},[4354],{"type":67,"value":3047},{"type":62,"tag":184,"props":4356,"children":4357},{"style":203},[4358],{"type":67,"value":4359},"user",{"type":62,"tag":184,"props":4361,"children":4362},{"style":333},[4363],{"type":67,"value":2119},{"type":62,"tag":184,"props":4365,"children":4366},{"style":197},[4367],{"type":67,"value":847},{"type":62,"tag":184,"props":4369,"children":4370},{"class":186,"line":363},[4371,4376,4380,4384,4388,4393,4397,4401,4406,4410,4414],{"type":62,"tag":184,"props":4372,"children":4373},{"style":191},[4374],{"type":67,"value":4375},"    throw",{"type":62,"tag":184,"props":4377,"children":4378},{"style":275},[4379],{"type":67,"value":4230},{"type":62,"tag":184,"props":4381,"children":4382},{"style":333},[4383],{"type":67,"value":297},{"type":62,"tag":184,"props":4385,"children":4386},{"style":197},[4387],{"type":67,"value":421},{"type":62,"tag":184,"props":4389,"children":4390},{"style":333},[4391],{"type":67,"value":4392}," to",{"type":62,"tag":184,"props":4394,"children":4395},{"style":197},[4396],{"type":67,"value":341},{"type":62,"tag":184,"props":4398,"children":4399},{"style":197},[4400],{"type":67,"value":221},{"type":62,"tag":184,"props":4402,"children":4403},{"style":224},[4404],{"type":67,"value":4405},"\u002Flogin",{"type":62,"tag":184,"props":4407,"children":4408},{"style":197},[4409],{"type":67,"value":355},{"type":62,"tag":184,"props":4411,"children":4412},{"style":197},[4413],{"type":67,"value":211},{"type":62,"tag":184,"props":4415,"children":4416},{"style":333},[4417],{"type":67,"value":374},{"type":62,"tag":184,"props":4419,"children":4420},{"class":186,"line":377},[4421],{"type":62,"tag":184,"props":4422,"children":4423},{"style":197},[4424],{"type":67,"value":2802},{"type":62,"tag":184,"props":4426,"children":4427},{"class":186,"line":385},[4428,4432],{"type":62,"tag":184,"props":4429,"children":4430},{"style":191},[4431],{"type":67,"value":326},{"type":62,"tag":184,"props":4433,"children":4434},{"style":203},[4435],{"type":67,"value":4436}," user\n",{"type":62,"tag":184,"props":4438,"children":4439},{"class":186,"line":394},[4440,4444],{"type":62,"tag":184,"props":4441,"children":4442},{"style":197},[4443],{"type":67,"value":369},{"type":62,"tag":184,"props":4445,"children":4446},{"style":203},[4447],{"type":67,"value":374},{"type":62,"tag":2840,"props":4449,"children":4451},{"id":4450},"not-found",[4452],{"type":67,"value":4453},"Not Found",{"type":62,"tag":173,"props":4455,"children":4457},{"className":175,"code":4456,"language":177,"meta":178,"style":178},"import { notFound } from '@tanstack\u002Freact-router'\n\nconst getPost = createServerFn()\n  .validator((data: { id: string }) => data)\n  .handler(async ({ data }) => {\n    const post = await db.findPost(data.id)\n    if (!post) {\n      throw notFound()\n    }\n    return post\n  })\n",[4458],{"type":62,"tag":76,"props":4459,"children":4460},{"__ignoreMap":178},[4461,4497,4504,4528,4583,4622,4676,4704,4719,4726,4738],{"type":62,"tag":184,"props":4462,"children":4463},{"class":186,"line":187},[4464,4468,4472,4477,4481,4485,4489,4493],{"type":62,"tag":184,"props":4465,"children":4466},{"style":191},[4467],{"type":67,"value":194},{"type":62,"tag":184,"props":4469,"children":4470},{"style":197},[4471],{"type":67,"value":200},{"type":62,"tag":184,"props":4473,"children":4474},{"style":203},[4475],{"type":67,"value":4476}," notFound",{"type":62,"tag":184,"props":4478,"children":4479},{"style":197},[4480],{"type":67,"value":211},{"type":62,"tag":184,"props":4482,"children":4483},{"style":191},[4484],{"type":67,"value":216},{"type":62,"tag":184,"props":4486,"children":4487},{"style":197},[4488],{"type":67,"value":221},{"type":62,"tag":184,"props":4490,"children":4491},{"style":224},[4492],{"type":67,"value":569},{"type":62,"tag":184,"props":4494,"children":4495},{"style":197},[4496],{"type":67,"value":232},{"type":62,"tag":184,"props":4498,"children":4499},{"class":186,"line":235},[4500],{"type":62,"tag":184,"props":4501,"children":4502},{"emptyLinePlaceholder":239},[4503],{"type":67,"value":242},{"type":62,"tag":184,"props":4505,"children":4506},{"class":186,"line":245},[4507,4511,4516,4520,4524],{"type":62,"tag":184,"props":4508,"children":4509},{"style":259},[4510],{"type":67,"value":262},{"type":62,"tag":184,"props":4512,"children":4513},{"style":203},[4514],{"type":67,"value":4515}," getPost ",{"type":62,"tag":184,"props":4517,"children":4518},{"style":197},[4519],{"type":67,"value":272},{"type":62,"tag":184,"props":4521,"children":4522},{"style":275},[4523],{"type":67,"value":206},{"type":62,"tag":184,"props":4525,"children":4526},{"style":203},[4527],{"type":67,"value":986},{"type":62,"tag":184,"props":4529,"children":4530},{"class":186,"line":255},[4531,4535,4539,4543,4547,4551,4555,4559,4563,4567,4571,4575,4579],{"type":62,"tag":184,"props":4532,"children":4533},{"style":197},[4534],{"type":67,"value":1315},{"type":62,"tag":184,"props":4536,"children":4537},{"style":275},[4538],{"type":67,"value":1320},{"type":62,"tag":184,"props":4540,"children":4541},{"style":203},[4542],{"type":67,"value":297},{"type":62,"tag":184,"props":4544,"children":4545},{"style":197},[4546],{"type":67,"value":297},{"type":62,"tag":184,"props":4548,"children":4549},{"style":1052},[4550],{"type":67,"value":1333},{"type":62,"tag":184,"props":4552,"children":4553},{"style":197},[4554],{"type":67,"value":341},{"type":62,"tag":184,"props":4556,"children":4557},{"style":197},[4558],{"type":67,"value":200},{"type":62,"tag":184,"props":4560,"children":4561},{"style":333},[4562],{"type":67,"value":1346},{"type":62,"tag":184,"props":4564,"children":4565},{"style":197},[4566],{"type":67,"value":341},{"type":62,"tag":184,"props":4568,"children":4569},{"style":1353},[4570],{"type":67,"value":1356},{"type":62,"tag":184,"props":4572,"children":4573},{"style":197},[4574],{"type":67,"value":1361},{"type":62,"tag":184,"props":4576,"children":4577},{"style":259},[4578],{"type":67,"value":312},{"type":62,"tag":184,"props":4580,"children":4581},{"style":203},[4582],{"type":67,"value":1370},{"type":62,"tag":184,"props":4584,"children":4585},{"class":186,"line":320},[4586,4590,4594,4598,4602,4606,4610,4614,4618],{"type":62,"tag":184,"props":4587,"children":4588},{"style":197},[4589],{"type":67,"value":1315},{"type":62,"tag":184,"props":4591,"children":4592},{"style":275},[4593],{"type":67,"value":292},{"type":62,"tag":184,"props":4595,"children":4596},{"style":203},[4597],{"type":67,"value":297},{"type":62,"tag":184,"props":4599,"children":4600},{"style":259},[4601],{"type":67,"value":302},{"type":62,"tag":184,"props":4603,"children":4604},{"style":197},[4605],{"type":67,"value":1394},{"type":62,"tag":184,"props":4607,"children":4608},{"style":1052},[4609],{"type":67,"value":1399},{"type":62,"tag":184,"props":4611,"children":4612},{"style":197},[4613],{"type":67,"value":1361},{"type":62,"tag":184,"props":4615,"children":4616},{"style":259},[4617],{"type":67,"value":312},{"type":62,"tag":184,"props":4619,"children":4620},{"style":197},[4621],{"type":67,"value":317},{"type":62,"tag":184,"props":4623,"children":4624},{"class":186,"line":363},[4625,4630,4635,4639,4643,4647,4651,4656,4660,4664,4668,4672],{"type":62,"tag":184,"props":4626,"children":4627},{"style":259},[4628],{"type":67,"value":4629},"    const",{"type":62,"tag":184,"props":4631,"children":4632},{"style":203},[4633],{"type":67,"value":4634}," post",{"type":62,"tag":184,"props":4636,"children":4637},{"style":197},[4638],{"type":67,"value":718},{"type":62,"tag":184,"props":4640,"children":4641},{"style":191},[4642],{"type":67,"value":723},{"type":62,"tag":184,"props":4644,"children":4645},{"style":203},[4646],{"type":67,"value":728},{"type":62,"tag":184,"props":4648,"children":4649},{"style":197},[4650],{"type":67,"value":287},{"type":62,"tag":184,"props":4652,"children":4653},{"style":275},[4654],{"type":67,"value":4655},"findPost",{"type":62,"tag":184,"props":4657,"children":4658},{"style":333},[4659],{"type":67,"value":297},{"type":62,"tag":184,"props":4661,"children":4662},{"style":203},[4663],{"type":67,"value":1333},{"type":62,"tag":184,"props":4665,"children":4666},{"style":197},[4667],{"type":67,"value":287},{"type":62,"tag":184,"props":4669,"children":4670},{"style":203},[4671],{"type":67,"value":1103},{"type":62,"tag":184,"props":4673,"children":4674},{"style":333},[4675],{"type":67,"value":374},{"type":62,"tag":184,"props":4677,"children":4678},{"class":186,"line":377},[4679,4683,4687,4691,4696,4700],{"type":62,"tag":184,"props":4680,"children":4681},{"style":191},[4682],{"type":67,"value":2020},{"type":62,"tag":184,"props":4684,"children":4685},{"style":333},[4686],{"type":67,"value":2671},{"type":62,"tag":184,"props":4688,"children":4689},{"style":197},[4690],{"type":67,"value":3047},{"type":62,"tag":184,"props":4692,"children":4693},{"style":203},[4694],{"type":67,"value":4695},"post",{"type":62,"tag":184,"props":4697,"children":4698},{"style":333},[4699],{"type":67,"value":2119},{"type":62,"tag":184,"props":4701,"children":4702},{"style":197},[4703],{"type":67,"value":847},{"type":62,"tag":184,"props":4705,"children":4706},{"class":186,"line":385},[4707,4711,4715],{"type":62,"tag":184,"props":4708,"children":4709},{"style":191},[4710],{"type":67,"value":2231},{"type":62,"tag":184,"props":4712,"children":4713},{"style":275},[4714],{"type":67,"value":4476},{"type":62,"tag":184,"props":4716,"children":4717},{"style":333},[4718],{"type":67,"value":986},{"type":62,"tag":184,"props":4720,"children":4721},{"class":186,"line":394},[4722],{"type":62,"tag":184,"props":4723,"children":4724},{"style":197},[4725],{"type":67,"value":2270},{"type":62,"tag":184,"props":4727,"children":4728},{"class":186,"line":483},[4729,4733],{"type":62,"tag":184,"props":4730,"children":4731},{"style":191},[4732],{"type":67,"value":1505},{"type":62,"tag":184,"props":4734,"children":4735},{"style":203},[4736],{"type":67,"value":4737}," post\n",{"type":62,"tag":184,"props":4739,"children":4740},{"class":186,"line":514},[4741,4745],{"type":62,"tag":184,"props":4742,"children":4743},{"style":197},[4744],{"type":67,"value":1533},{"type":62,"tag":184,"props":4746,"children":4747},{"style":203},[4748],{"type":67,"value":374},{"type":62,"tag":166,"props":4750,"children":4752},{"id":4751},"server-context-utilities",[4753],{"type":67,"value":4754},"Server Context Utilities",{"type":62,"tag":70,"props":4756,"children":4757},{},[4758],{"type":67,"value":4759},"Access request\u002Fresponse details inside server function handlers:",{"type":62,"tag":173,"props":4761,"children":4763},{"className":175,"code":4762,"language":177,"meta":178,"style":178},"import { createServerFn } from '@tanstack\u002Freact-start'\nimport {\n  getRequest,\n  getRequestHeader,\n  setResponseHeaders,\n  setResponseStatus,\n} from '@tanstack\u002Freact-start\u002Fserver'\n\n\u002F\u002F Public, non-personalized data — safe to cache shared across users.\nconst getPublicData = createServerFn({ method: 'GET' }).handler(async () => {\n  setResponseHeaders({\n    \u002F\u002F 'public' is correct ONLY when the response does not depend on identity.\n    \u002F\u002F For anything tied to a session\u002Fuser\u002Ftenant, use 'private' or 'no-store'.\n    'Cache-Control': 'public, max-age=300',\n  })\n  setResponseStatus(200)\n  return fetchPublicData()\n})\n\n\u002F\u002F Authenticated data — must NOT be 'public'.\nconst getMyData = createServerFn({ method: 'GET' }).handler(async () => {\n  const authHeader = getRequestHeader('Authorization')\n  \u002F\u002F ... auth check ...\n\n  setResponseHeaders({\n    \u002F\u002F 'private' = only the user-agent may cache. Vary by Cookie\u002FAuthorization\n    \u002F\u002F so any intermediary that does cache keys by identity, not URL alone.\n    'Cache-Control': 'private, max-age=60',\n    Vary: 'Cookie, Authorization',\n  })\n  return fetchPersonalizedData()\n})\n",[4764],{"type":62,"tag":76,"props":4765,"children":4766},{"__ignoreMap":178},[4767,4802,4813,4825,4837,4849,4861,4885,4892,4900,4984,4999,5007,5015,5053,5064,5084,5100,5111,5118,5126,5210,5252,5260,5267,5282,5290,5298,5334,5363,5374,5390],{"type":62,"tag":184,"props":4768,"children":4769},{"class":186,"line":187},[4770,4774,4778,4782,4786,4790,4794,4798],{"type":62,"tag":184,"props":4771,"children":4772},{"style":191},[4773],{"type":67,"value":194},{"type":62,"tag":184,"props":4775,"children":4776},{"style":197},[4777],{"type":67,"value":200},{"type":62,"tag":184,"props":4779,"children":4780},{"style":203},[4781],{"type":67,"value":206},{"type":62,"tag":184,"props":4783,"children":4784},{"style":197},[4785],{"type":67,"value":211},{"type":62,"tag":184,"props":4787,"children":4788},{"style":191},[4789],{"type":67,"value":216},{"type":62,"tag":184,"props":4791,"children":4792},{"style":197},[4793],{"type":67,"value":221},{"type":62,"tag":184,"props":4795,"children":4796},{"style":224},[4797],{"type":67,"value":227},{"type":62,"tag":184,"props":4799,"children":4800},{"style":197},[4801],{"type":67,"value":232},{"type":62,"tag":184,"props":4803,"children":4804},{"class":186,"line":235},[4805,4809],{"type":62,"tag":184,"props":4806,"children":4807},{"style":191},[4808],{"type":67,"value":194},{"type":62,"tag":184,"props":4810,"children":4811},{"style":197},[4812],{"type":67,"value":317},{"type":62,"tag":184,"props":4814,"children":4815},{"class":186,"line":245},[4816,4821],{"type":62,"tag":184,"props":4817,"children":4818},{"style":203},[4819],{"type":67,"value":4820},"  getRequest",{"type":62,"tag":184,"props":4822,"children":4823},{"style":197},[4824],{"type":67,"value":881},{"type":62,"tag":184,"props":4826,"children":4827},{"class":186,"line":255},[4828,4833],{"type":62,"tag":184,"props":4829,"children":4830},{"style":203},[4831],{"type":67,"value":4832},"  getRequestHeader",{"type":62,"tag":184,"props":4834,"children":4835},{"style":197},[4836],{"type":67,"value":881},{"type":62,"tag":184,"props":4838,"children":4839},{"class":186,"line":320},[4840,4845],{"type":62,"tag":184,"props":4841,"children":4842},{"style":203},[4843],{"type":67,"value":4844},"  setResponseHeaders",{"type":62,"tag":184,"props":4846,"children":4847},{"style":197},[4848],{"type":67,"value":881},{"type":62,"tag":184,"props":4850,"children":4851},{"class":186,"line":363},[4852,4857],{"type":62,"tag":184,"props":4853,"children":4854},{"style":203},[4855],{"type":67,"value":4856},"  setResponseStatus",{"type":62,"tag":184,"props":4858,"children":4859},{"style":197},[4860],{"type":67,"value":881},{"type":62,"tag":184,"props":4862,"children":4863},{"class":186,"line":377},[4864,4868,4872,4876,4881],{"type":62,"tag":184,"props":4865,"children":4866},{"style":197},[4867],{"type":67,"value":369},{"type":62,"tag":184,"props":4869,"children":4870},{"style":191},[4871],{"type":67,"value":216},{"type":62,"tag":184,"props":4873,"children":4874},{"style":197},[4875],{"type":67,"value":221},{"type":62,"tag":184,"props":4877,"children":4878},{"style":224},[4879],{"type":67,"value":4880},"@tanstack\u002Freact-start\u002Fserver",{"type":62,"tag":184,"props":4882,"children":4883},{"style":197},[4884],{"type":67,"value":232},{"type":62,"tag":184,"props":4886,"children":4887},{"class":186,"line":385},[4888],{"type":62,"tag":184,"props":4889,"children":4890},{"emptyLinePlaceholder":239},[4891],{"type":67,"value":242},{"type":62,"tag":184,"props":4893,"children":4894},{"class":186,"line":394},[4895],{"type":62,"tag":184,"props":4896,"children":4897},{"style":249},[4898],{"type":67,"value":4899},"\u002F\u002F Public, non-personalized data — safe to cache shared across users.\n",{"type":62,"tag":184,"props":4901,"children":4902},{"class":186,"line":483},[4903,4907,4912,4916,4920,4924,4928,4932,4936,4940,4944,4948,4952,4956,4960,4964,4968,4972,4976,4980],{"type":62,"tag":184,"props":4904,"children":4905},{"style":259},[4906],{"type":67,"value":262},{"type":62,"tag":184,"props":4908,"children":4909},{"style":203},[4910],{"type":67,"value":4911}," getPublicData ",{"type":62,"tag":184,"props":4913,"children":4914},{"style":197},[4915],{"type":67,"value":272},{"type":62,"tag":184,"props":4917,"children":4918},{"style":275},[4919],{"type":67,"value":206},{"type":62,"tag":184,"props":4921,"children":4922},{"style":203},[4923],{"type":67,"value":297},{"type":62,"tag":184,"props":4925,"children":4926},{"style":197},[4927],{"type":67,"value":421},{"type":62,"tag":184,"props":4929,"children":4930},{"style":333},[4931],{"type":67,"value":426},{"type":62,"tag":184,"props":4933,"children":4934},{"style":197},[4935],{"type":67,"value":341},{"type":62,"tag":184,"props":4937,"children":4938},{"style":197},[4939],{"type":67,"value":221},{"type":62,"tag":184,"props":4941,"children":4942},{"style":224},[4943],{"type":67,"value":660},{"type":62,"tag":184,"props":4945,"children":4946},{"style":197},[4947],{"type":67,"value":355},{"type":62,"tag":184,"props":4949,"children":4950},{"style":197},[4951],{"type":67,"value":211},{"type":62,"tag":184,"props":4953,"children":4954},{"style":203},[4955],{"type":67,"value":452},{"type":62,"tag":184,"props":4957,"children":4958},{"style":197},[4959],{"type":67,"value":287},{"type":62,"tag":184,"props":4961,"children":4962},{"style":275},[4963],{"type":67,"value":292},{"type":62,"tag":184,"props":4965,"children":4966},{"style":203},[4967],{"type":67,"value":297},{"type":62,"tag":184,"props":4969,"children":4970},{"style":259},[4971],{"type":67,"value":302},{"type":62,"tag":184,"props":4973,"children":4974},{"style":197},[4975],{"type":67,"value":307},{"type":62,"tag":184,"props":4977,"children":4978},{"style":259},[4979],{"type":67,"value":312},{"type":62,"tag":184,"props":4981,"children":4982},{"style":197},[4983],{"type":67,"value":317},{"type":62,"tag":184,"props":4985,"children":4986},{"class":186,"line":514},[4987,4991,4995],{"type":62,"tag":184,"props":4988,"children":4989},{"style":275},[4990],{"type":67,"value":4844},{"type":62,"tag":184,"props":4992,"children":4993},{"style":333},[4994],{"type":67,"value":297},{"type":62,"tag":184,"props":4996,"children":4997},{"style":197},[4998],{"type":67,"value":847},{"type":62,"tag":184,"props":5000,"children":5001},{"class":186,"line":905},[5002],{"type":62,"tag":184,"props":5003,"children":5004},{"style":249},[5005],{"type":67,"value":5006},"    \u002F\u002F 'public' is correct ONLY when the response does not depend on identity.\n",{"type":62,"tag":184,"props":5008,"children":5009},{"class":186,"line":917},[5010],{"type":62,"tag":184,"props":5011,"children":5012},{"style":249},[5013],{"type":67,"value":5014},"    \u002F\u002F For anything tied to a session\u002Fuser\u002Ftenant, use 'private' or 'no-store'.\n",{"type":62,"tag":184,"props":5016,"children":5017},{"class":186,"line":925},[5018,5023,5028,5032,5036,5040,5045,5049],{"type":62,"tag":184,"props":5019,"children":5020},{"style":197},[5021],{"type":67,"value":5022},"    '",{"type":62,"tag":184,"props":5024,"children":5025},{"style":333},[5026],{"type":67,"value":5027},"Cache-Control",{"type":62,"tag":184,"props":5029,"children":5030},{"style":197},[5031],{"type":67,"value":355},{"type":62,"tag":184,"props":5033,"children":5034},{"style":197},[5035],{"type":67,"value":341},{"type":62,"tag":184,"props":5037,"children":5038},{"style":197},[5039],{"type":67,"value":221},{"type":62,"tag":184,"props":5041,"children":5042},{"style":224},[5043],{"type":67,"value":5044},"public, max-age=300",{"type":62,"tag":184,"props":5046,"children":5047},{"style":197},[5048],{"type":67,"value":355},{"type":62,"tag":184,"props":5050,"children":5051},{"style":197},[5052],{"type":67,"value":881},{"type":62,"tag":184,"props":5054,"children":5055},{"class":186,"line":946},[5056,5060],{"type":62,"tag":184,"props":5057,"children":5058},{"style":197},[5059],{"type":67,"value":1533},{"type":62,"tag":184,"props":5061,"children":5062},{"style":333},[5063],{"type":67,"value":374},{"type":62,"tag":184,"props":5065,"children":5066},{"class":186,"line":989},[5067,5071,5075,5080],{"type":62,"tag":184,"props":5068,"children":5069},{"style":275},[5070],{"type":67,"value":4856},{"type":62,"tag":184,"props":5072,"children":5073},{"style":333},[5074],{"type":67,"value":297},{"type":62,"tag":184,"props":5076,"children":5077},{"style":2208},[5078],{"type":67,"value":5079},"200",{"type":62,"tag":184,"props":5081,"children":5082},{"style":333},[5083],{"type":67,"value":374},{"type":62,"tag":184,"props":5085,"children":5086},{"class":186,"line":1002},[5087,5091,5096],{"type":62,"tag":184,"props":5088,"children":5089},{"style":191},[5090],{"type":67,"value":326},{"type":62,"tag":184,"props":5092,"children":5093},{"style":275},[5094],{"type":67,"value":5095}," fetchPublicData",{"type":62,"tag":184,"props":5097,"children":5098},{"style":333},[5099],{"type":67,"value":986},{"type":62,"tag":184,"props":5101,"children":5102},{"class":186,"line":1021},[5103,5107],{"type":62,"tag":184,"props":5104,"children":5105},{"style":197},[5106],{"type":67,"value":369},{"type":62,"tag":184,"props":5108,"children":5109},{"style":203},[5110],{"type":67,"value":374},{"type":62,"tag":184,"props":5112,"children":5113},{"class":186,"line":1069},[5114],{"type":62,"tag":184,"props":5115,"children":5116},{"emptyLinePlaceholder":239},[5117],{"type":67,"value":242},{"type":62,"tag":184,"props":5119,"children":5120},{"class":186,"line":1137},[5121],{"type":62,"tag":184,"props":5122,"children":5123},{"style":249},[5124],{"type":67,"value":5125},"\u002F\u002F Authenticated data — must NOT be 'public'.\n",{"type":62,"tag":184,"props":5127,"children":5128},{"class":186,"line":1151},[5129,5133,5138,5142,5146,5150,5154,5158,5162,5166,5170,5174,5178,5182,5186,5190,5194,5198,5202,5206],{"type":62,"tag":184,"props":5130,"children":5131},{"style":259},[5132],{"type":67,"value":262},{"type":62,"tag":184,"props":5134,"children":5135},{"style":203},[5136],{"type":67,"value":5137}," getMyData ",{"type":62,"tag":184,"props":5139,"children":5140},{"style":197},[5141],{"type":67,"value":272},{"type":62,"tag":184,"props":5143,"children":5144},{"style":275},[5145],{"type":67,"value":206},{"type":62,"tag":184,"props":5147,"children":5148},{"style":203},[5149],{"type":67,"value":297},{"type":62,"tag":184,"props":5151,"children":5152},{"style":197},[5153],{"type":67,"value":421},{"type":62,"tag":184,"props":5155,"children":5156},{"style":333},[5157],{"type":67,"value":426},{"type":62,"tag":184,"props":5159,"children":5160},{"style":197},[5161],{"type":67,"value":341},{"type":62,"tag":184,"props":5163,"children":5164},{"style":197},[5165],{"type":67,"value":221},{"type":62,"tag":184,"props":5167,"children":5168},{"style":224},[5169],{"type":67,"value":660},{"type":62,"tag":184,"props":5171,"children":5172},{"style":197},[5173],{"type":67,"value":355},{"type":62,"tag":184,"props":5175,"children":5176},{"style":197},[5177],{"type":67,"value":211},{"type":62,"tag":184,"props":5179,"children":5180},{"style":203},[5181],{"type":67,"value":452},{"type":62,"tag":184,"props":5183,"children":5184},{"style":197},[5185],{"type":67,"value":287},{"type":62,"tag":184,"props":5187,"children":5188},{"style":275},[5189],{"type":67,"value":292},{"type":62,"tag":184,"props":5191,"children":5192},{"style":203},[5193],{"type":67,"value":297},{"type":62,"tag":184,"props":5195,"children":5196},{"style":259},[5197],{"type":67,"value":302},{"type":62,"tag":184,"props":5199,"children":5200},{"style":197},[5201],{"type":67,"value":307},{"type":62,"tag":184,"props":5203,"children":5204},{"style":259},[5205],{"type":67,"value":312},{"type":62,"tag":184,"props":5207,"children":5208},{"style":197},[5209],{"type":67,"value":317},{"type":62,"tag":184,"props":5211,"children":5212},{"class":186,"line":1168},[5213,5217,5222,5226,5231,5235,5239,5244,5248],{"type":62,"tag":184,"props":5214,"children":5215},{"style":259},[5216],{"type":67,"value":708},{"type":62,"tag":184,"props":5218,"children":5219},{"style":203},[5220],{"type":67,"value":5221}," authHeader",{"type":62,"tag":184,"props":5223,"children":5224},{"style":197},[5225],{"type":67,"value":718},{"type":62,"tag":184,"props":5227,"children":5228},{"style":275},[5229],{"type":67,"value":5230}," getRequestHeader",{"type":62,"tag":184,"props":5232,"children":5233},{"style":333},[5234],{"type":67,"value":297},{"type":62,"tag":184,"props":5236,"children":5237},{"style":197},[5238],{"type":67,"value":355},{"type":62,"tag":184,"props":5240,"children":5241},{"style":224},[5242],{"type":67,"value":5243},"Authorization",{"type":62,"tag":184,"props":5245,"children":5246},{"style":197},[5247],{"type":67,"value":355},{"type":62,"tag":184,"props":5249,"children":5250},{"style":333},[5251],{"type":67,"value":374},{"type":62,"tag":184,"props":5253,"children":5254},{"class":186,"line":1177},[5255],{"type":62,"tag":184,"props":5256,"children":5257},{"style":249},[5258],{"type":67,"value":5259},"  \u002F\u002F ... auth check ...\n",{"type":62,"tag":184,"props":5261,"children":5262},{"class":186,"line":2518},[5263],{"type":62,"tag":184,"props":5264,"children":5265},{"emptyLinePlaceholder":239},[5266],{"type":67,"value":242},{"type":62,"tag":184,"props":5268,"children":5269},{"class":186,"line":2539},[5270,5274,5278],{"type":62,"tag":184,"props":5271,"children":5272},{"style":275},[5273],{"type":67,"value":4844},{"type":62,"tag":184,"props":5275,"children":5276},{"style":333},[5277],{"type":67,"value":297},{"type":62,"tag":184,"props":5279,"children":5280},{"style":197},[5281],{"type":67,"value":847},{"type":62,"tag":184,"props":5283,"children":5284},{"class":186,"line":2551},[5285],{"type":62,"tag":184,"props":5286,"children":5287},{"style":249},[5288],{"type":67,"value":5289},"    \u002F\u002F 'private' = only the user-agent may cache. Vary by Cookie\u002FAuthorization\n",{"type":62,"tag":184,"props":5291,"children":5292},{"class":186,"line":2559},[5293],{"type":62,"tag":184,"props":5294,"children":5295},{"style":249},[5296],{"type":67,"value":5297},"    \u002F\u002F so any intermediary that does cache keys by identity, not URL alone.\n",{"type":62,"tag":184,"props":5299,"children":5300},{"class":186,"line":2579},[5301,5305,5309,5313,5317,5321,5326,5330],{"type":62,"tag":184,"props":5302,"children":5303},{"style":197},[5304],{"type":67,"value":5022},{"type":62,"tag":184,"props":5306,"children":5307},{"style":333},[5308],{"type":67,"value":5027},{"type":62,"tag":184,"props":5310,"children":5311},{"style":197},[5312],{"type":67,"value":355},{"type":62,"tag":184,"props":5314,"children":5315},{"style":197},[5316],{"type":67,"value":341},{"type":62,"tag":184,"props":5318,"children":5319},{"style":197},[5320],{"type":67,"value":221},{"type":62,"tag":184,"props":5322,"children":5323},{"style":224},[5324],{"type":67,"value":5325},"private, max-age=60",{"type":62,"tag":184,"props":5327,"children":5328},{"style":197},[5329],{"type":67,"value":355},{"type":62,"tag":184,"props":5331,"children":5332},{"style":197},[5333],{"type":67,"value":881},{"type":62,"tag":184,"props":5335,"children":5336},{"class":186,"line":2605},[5337,5342,5346,5350,5355,5359],{"type":62,"tag":184,"props":5338,"children":5339},{"style":333},[5340],{"type":67,"value":5341},"    Vary",{"type":62,"tag":184,"props":5343,"children":5344},{"style":197},[5345],{"type":67,"value":341},{"type":62,"tag":184,"props":5347,"children":5348},{"style":197},[5349],{"type":67,"value":221},{"type":62,"tag":184,"props":5351,"children":5352},{"style":224},[5353],{"type":67,"value":5354},"Cookie, Authorization",{"type":62,"tag":184,"props":5356,"children":5357},{"style":197},[5358],{"type":67,"value":355},{"type":62,"tag":184,"props":5360,"children":5361},{"style":197},[5362],{"type":67,"value":881},{"type":62,"tag":184,"props":5364,"children":5365},{"class":186,"line":2639},[5366,5370],{"type":62,"tag":184,"props":5367,"children":5368},{"style":197},[5369],{"type":67,"value":1533},{"type":62,"tag":184,"props":5371,"children":5372},{"style":333},[5373],{"type":67,"value":374},{"type":62,"tag":184,"props":5375,"children":5376},{"class":186,"line":2647},[5377,5381,5386],{"type":62,"tag":184,"props":5378,"children":5379},{"style":191},[5380],{"type":67,"value":326},{"type":62,"tag":184,"props":5382,"children":5383},{"style":275},[5384],{"type":67,"value":5385}," fetchPersonalizedData",{"type":62,"tag":184,"props":5387,"children":5388},{"style":333},[5389],{"type":67,"value":986},{"type":62,"tag":184,"props":5391,"children":5392},{"class":186,"line":2698},[5393,5397],{"type":62,"tag":184,"props":5394,"children":5395},{"style":197},[5396],{"type":67,"value":369},{"type":62,"tag":184,"props":5398,"children":5399},{"style":203},[5400],{"type":67,"value":374},{"type":62,"tag":70,"props":5402,"children":5403},{},[5404],{"type":67,"value":5405},"Available utilities:",{"type":62,"tag":1013,"props":5407,"children":5408},{},[5409,5420,5431,5442,5453],{"type":62,"tag":1080,"props":5410,"children":5411},{},[5412,5418],{"type":62,"tag":76,"props":5413,"children":5415},{"className":5414},[],[5416],{"type":67,"value":5417},"getRequest()",{"type":67,"value":5419}," — full Request object",{"type":62,"tag":1080,"props":5421,"children":5422},{},[5423,5429],{"type":62,"tag":76,"props":5424,"children":5426},{"className":5425},[],[5427],{"type":67,"value":5428},"getRequestHeader(name)",{"type":67,"value":5430}," — single request header",{"type":62,"tag":1080,"props":5432,"children":5433},{},[5434,5440],{"type":62,"tag":76,"props":5435,"children":5437},{"className":5436},[],[5438],{"type":67,"value":5439},"setResponseHeader(name, value)",{"type":67,"value":5441}," — single response header",{"type":62,"tag":1080,"props":5443,"children":5444},{},[5445,5451],{"type":62,"tag":76,"props":5446,"children":5448},{"className":5447},[],[5449],{"type":67,"value":5450},"setResponseHeaders(headers)",{"type":67,"value":5452}," — multiple response headers",{"type":62,"tag":1080,"props":5454,"children":5455},{},[5456,5462],{"type":62,"tag":76,"props":5457,"children":5459},{"className":5458},[],[5460],{"type":67,"value":5461},"setResponseStatus(code)",{"type":67,"value":5463}," — HTTP status code",{"type":62,"tag":166,"props":5465,"children":5467},{"id":5466},"file-organization",[5468],{"type":67,"value":5469},"File Organization",{"type":62,"tag":173,"props":5471,"children":5475},{"className":5472,"code":5474,"language":67,"meta":178},[5473],"language-text","src\u002Futils\u002F\n├── users.functions.ts   # createServerFn wrappers (safe to import anywhere)\n├── users.server.ts      # Server-only helpers (DB queries, internal logic)\n└── schemas.ts           # Shared validation schemas (client-safe)\n",[5476],{"type":62,"tag":76,"props":5477,"children":5478},{"__ignoreMap":178},[5479],{"type":67,"value":5474},{"type":62,"tag":173,"props":5481,"children":5483},{"className":175,"code":5482,"language":177,"meta":178,"style":178},"\u002F\u002F users.server.ts — server-only helpers\nimport { db } from '~\u002Fdb'\n\nexport async function findUserById(id: string) {\n  return db.query.users.findFirst({ where: eq(users.id, id) })\n}\n",[5484],{"type":62,"tag":76,"props":5485,"children":5486},{"__ignoreMap":178},[5487,5495,5531,5538,5583,5679],{"type":62,"tag":184,"props":5488,"children":5489},{"class":186,"line":187},[5490],{"type":62,"tag":184,"props":5491,"children":5492},{"style":249},[5493],{"type":67,"value":5494},"\u002F\u002F users.server.ts — server-only helpers\n",{"type":62,"tag":184,"props":5496,"children":5497},{"class":186,"line":235},[5498,5502,5506,5510,5514,5518,5522,5527],{"type":62,"tag":184,"props":5499,"children":5500},{"style":191},[5501],{"type":67,"value":194},{"type":62,"tag":184,"props":5503,"children":5504},{"style":197},[5505],{"type":67,"value":200},{"type":62,"tag":184,"props":5507,"children":5508},{"style":203},[5509],{"type":67,"value":728},{"type":62,"tag":184,"props":5511,"children":5512},{"style":197},[5513],{"type":67,"value":211},{"type":62,"tag":184,"props":5515,"children":5516},{"style":191},[5517],{"type":67,"value":216},{"type":62,"tag":184,"props":5519,"children":5520},{"style":197},[5521],{"type":67,"value":221},{"type":62,"tag":184,"props":5523,"children":5524},{"style":224},[5525],{"type":67,"value":5526},"~\u002Fdb",{"type":62,"tag":184,"props":5528,"children":5529},{"style":197},[5530],{"type":67,"value":232},{"type":62,"tag":184,"props":5532,"children":5533},{"class":186,"line":245},[5534],{"type":62,"tag":184,"props":5535,"children":5536},{"emptyLinePlaceholder":239},[5537],{"type":67,"value":242},{"type":62,"tag":184,"props":5539,"children":5540},{"class":186,"line":255},[5541,5545,5549,5554,5559,5563,5567,5571,5575,5579],{"type":62,"tag":184,"props":5542,"children":5543},{"style":191},[5544],{"type":67,"value":803},{"type":62,"tag":184,"props":5546,"children":5547},{"style":259},[5548],{"type":67,"value":2666},{"type":62,"tag":184,"props":5550,"children":5551},{"style":259},[5552],{"type":67,"value":5553}," function",{"type":62,"tag":184,"props":5555,"children":5556},{"style":275},[5557],{"type":67,"value":5558}," findUserById",{"type":62,"tag":184,"props":5560,"children":5561},{"style":197},[5562],{"type":67,"value":297},{"type":62,"tag":184,"props":5564,"children":5565},{"style":1052},[5566],{"type":67,"value":1103},{"type":62,"tag":184,"props":5568,"children":5569},{"style":197},[5570],{"type":67,"value":341},{"type":62,"tag":184,"props":5572,"children":5573},{"style":1353},[5574],{"type":67,"value":1356},{"type":62,"tag":184,"props":5576,"children":5577},{"style":197},[5578],{"type":67,"value":452},{"type":62,"tag":184,"props":5580,"children":5581},{"style":197},[5582],{"type":67,"value":317},{"type":62,"tag":184,"props":5584,"children":5585},{"class":186,"line":320},[5586,5590,5594,5598,5602,5606,5611,5615,5620,5624,5628,5633,5637,5642,5646,5650,5654,5658,5663,5667,5671,5675],{"type":62,"tag":184,"props":5587,"children":5588},{"style":191},[5589],{"type":67,"value":326},{"type":62,"tag":184,"props":5591,"children":5592},{"style":203},[5593],{"type":67,"value":728},{"type":62,"tag":184,"props":5595,"children":5596},{"style":197},[5597],{"type":67,"value":287},{"type":62,"tag":184,"props":5599,"children":5600},{"style":203},[5601],{"type":67,"value":737},{"type":62,"tag":184,"props":5603,"children":5604},{"style":197},[5605],{"type":67,"value":287},{"type":62,"tag":184,"props":5607,"children":5608},{"style":203},[5609],{"type":67,"value":5610},"users",{"type":62,"tag":184,"props":5612,"children":5613},{"style":197},[5614],{"type":67,"value":287},{"type":62,"tag":184,"props":5616,"children":5617},{"style":275},[5618],{"type":67,"value":5619},"findFirst",{"type":62,"tag":184,"props":5621,"children":5622},{"style":333},[5623],{"type":67,"value":297},{"type":62,"tag":184,"props":5625,"children":5626},{"style":197},[5627],{"type":67,"value":421},{"type":62,"tag":184,"props":5629,"children":5630},{"style":333},[5631],{"type":67,"value":5632}," where",{"type":62,"tag":184,"props":5634,"children":5635},{"style":197},[5636],{"type":67,"value":341},{"type":62,"tag":184,"props":5638,"children":5639},{"style":275},[5640],{"type":67,"value":5641}," eq",{"type":62,"tag":184,"props":5643,"children":5644},{"style":333},[5645],{"type":67,"value":297},{"type":62,"tag":184,"props":5647,"children":5648},{"style":203},[5649],{"type":67,"value":5610},{"type":62,"tag":184,"props":5651,"children":5652},{"style":197},[5653],{"type":67,"value":287},{"type":62,"tag":184,"props":5655,"children":5656},{"style":203},[5657],{"type":67,"value":1103},{"type":62,"tag":184,"props":5659,"children":5660},{"style":197},[5661],{"type":67,"value":5662},",",{"type":62,"tag":184,"props":5664,"children":5665},{"style":203},[5666],{"type":67,"value":1346},{"type":62,"tag":184,"props":5668,"children":5669},{"style":333},[5670],{"type":67,"value":2119},{"type":62,"tag":184,"props":5672,"children":5673},{"style":197},[5674],{"type":67,"value":369},{"type":62,"tag":184,"props":5676,"children":5677},{"style":333},[5678],{"type":67,"value":374},{"type":62,"tag":184,"props":5680,"children":5681},{"class":186,"line":363},[5682],{"type":62,"tag":184,"props":5683,"children":5684},{"style":197},[5685],{"type":67,"value":1148},{"type":62,"tag":173,"props":5687,"children":5689},{"className":175,"code":5688,"language":177,"meta":178,"style":178},"\u002F\u002F users.functions.ts — server functions\nimport { createServerFn } from '@tanstack\u002Freact-start'\nimport { findUserById } from '.\u002Fusers.server'\n\nexport const getUser = createServerFn({ method: 'GET' })\n  .validator((data: { id: string }) => data)\n  .handler(async ({ data }) => {\n    return findUserById(data.id)\n  })\n",[5690],{"type":62,"tag":76,"props":5691,"children":5692},{"__ignoreMap":178},[5693,5701,5736,5772,5779,5839,5894,5933,5964],{"type":62,"tag":184,"props":5694,"children":5695},{"class":186,"line":187},[5696],{"type":62,"tag":184,"props":5697,"children":5698},{"style":249},[5699],{"type":67,"value":5700},"\u002F\u002F users.functions.ts — server functions\n",{"type":62,"tag":184,"props":5702,"children":5703},{"class":186,"line":235},[5704,5708,5712,5716,5720,5724,5728,5732],{"type":62,"tag":184,"props":5705,"children":5706},{"style":191},[5707],{"type":67,"value":194},{"type":62,"tag":184,"props":5709,"children":5710},{"style":197},[5711],{"type":67,"value":200},{"type":62,"tag":184,"props":5713,"children":5714},{"style":203},[5715],{"type":67,"value":206},{"type":62,"tag":184,"props":5717,"children":5718},{"style":197},[5719],{"type":67,"value":211},{"type":62,"tag":184,"props":5721,"children":5722},{"style":191},[5723],{"type":67,"value":216},{"type":62,"tag":184,"props":5725,"children":5726},{"style":197},[5727],{"type":67,"value":221},{"type":62,"tag":184,"props":5729,"children":5730},{"style":224},[5731],{"type":67,"value":227},{"type":62,"tag":184,"props":5733,"children":5734},{"style":197},[5735],{"type":67,"value":232},{"type":62,"tag":184,"props":5737,"children":5738},{"class":186,"line":245},[5739,5743,5747,5751,5755,5759,5763,5768],{"type":62,"tag":184,"props":5740,"children":5741},{"style":191},[5742],{"type":67,"value":194},{"type":62,"tag":184,"props":5744,"children":5745},{"style":197},[5746],{"type":67,"value":200},{"type":62,"tag":184,"props":5748,"children":5749},{"style":203},[5750],{"type":67,"value":5558},{"type":62,"tag":184,"props":5752,"children":5753},{"style":197},[5754],{"type":67,"value":211},{"type":62,"tag":184,"props":5756,"children":5757},{"style":191},[5758],{"type":67,"value":216},{"type":62,"tag":184,"props":5760,"children":5761},{"style":197},[5762],{"type":67,"value":221},{"type":62,"tag":184,"props":5764,"children":5765},{"style":224},[5766],{"type":67,"value":5767},".\u002Fusers.server",{"type":62,"tag":184,"props":5769,"children":5770},{"style":197},[5771],{"type":67,"value":232},{"type":62,"tag":184,"props":5773,"children":5774},{"class":186,"line":255},[5775],{"type":62,"tag":184,"props":5776,"children":5777},{"emptyLinePlaceholder":239},[5778],{"type":67,"value":242},{"type":62,"tag":184,"props":5780,"children":5781},{"class":186,"line":320},[5782,5786,5790,5795,5799,5803,5807,5811,5815,5819,5823,5827,5831,5835],{"type":62,"tag":184,"props":5783,"children":5784},{"style":191},[5785],{"type":67,"value":803},{"type":62,"tag":184,"props":5787,"children":5788},{"style":259},[5789],{"type":67,"value":808},{"type":62,"tag":184,"props":5791,"children":5792},{"style":203},[5793],{"type":67,"value":5794}," getUser ",{"type":62,"tag":184,"props":5796,"children":5797},{"style":197},[5798],{"type":67,"value":272},{"type":62,"tag":184,"props":5800,"children":5801},{"style":275},[5802],{"type":67,"value":206},{"type":62,"tag":184,"props":5804,"children":5805},{"style":203},[5806],{"type":67,"value":297},{"type":62,"tag":184,"props":5808,"children":5809},{"style":197},[5810],{"type":67,"value":421},{"type":62,"tag":184,"props":5812,"children":5813},{"style":333},[5814],{"type":67,"value":426},{"type":62,"tag":184,"props":5816,"children":5817},{"style":197},[5818],{"type":67,"value":341},{"type":62,"tag":184,"props":5820,"children":5821},{"style":197},[5822],{"type":67,"value":221},{"type":62,"tag":184,"props":5824,"children":5825},{"style":224},[5826],{"type":67,"value":660},{"type":62,"tag":184,"props":5828,"children":5829},{"style":197},[5830],{"type":67,"value":355},{"type":62,"tag":184,"props":5832,"children":5833},{"style":197},[5834],{"type":67,"value":211},{"type":62,"tag":184,"props":5836,"children":5837},{"style":203},[5838],{"type":67,"value":374},{"type":62,"tag":184,"props":5840,"children":5841},{"class":186,"line":363},[5842,5846,5850,5854,5858,5862,5866,5870,5874,5878,5882,5886,5890],{"type":62,"tag":184,"props":5843,"children":5844},{"style":197},[5845],{"type":67,"value":1315},{"type":62,"tag":184,"props":5847,"children":5848},{"style":275},[5849],{"type":67,"value":1320},{"type":62,"tag":184,"props":5851,"children":5852},{"style":203},[5853],{"type":67,"value":297},{"type":62,"tag":184,"props":5855,"children":5856},{"style":197},[5857],{"type":67,"value":297},{"type":62,"tag":184,"props":5859,"children":5860},{"style":1052},[5861],{"type":67,"value":1333},{"type":62,"tag":184,"props":5863,"children":5864},{"style":197},[5865],{"type":67,"value":341},{"type":62,"tag":184,"props":5867,"children":5868},{"style":197},[5869],{"type":67,"value":200},{"type":62,"tag":184,"props":5871,"children":5872},{"style":333},[5873],{"type":67,"value":1346},{"type":62,"tag":184,"props":5875,"children":5876},{"style":197},[5877],{"type":67,"value":341},{"type":62,"tag":184,"props":5879,"children":5880},{"style":1353},[5881],{"type":67,"value":1356},{"type":62,"tag":184,"props":5883,"children":5884},{"style":197},[5885],{"type":67,"value":1361},{"type":62,"tag":184,"props":5887,"children":5888},{"style":259},[5889],{"type":67,"value":312},{"type":62,"tag":184,"props":5891,"children":5892},{"style":203},[5893],{"type":67,"value":1370},{"type":62,"tag":184,"props":5895,"children":5896},{"class":186,"line":377},[5897,5901,5905,5909,5913,5917,5921,5925,5929],{"type":62,"tag":184,"props":5898,"children":5899},{"style":197},[5900],{"type":67,"value":1315},{"type":62,"tag":184,"props":5902,"children":5903},{"style":275},[5904],{"type":67,"value":292},{"type":62,"tag":184,"props":5906,"children":5907},{"style":203},[5908],{"type":67,"value":297},{"type":62,"tag":184,"props":5910,"children":5911},{"style":259},[5912],{"type":67,"value":302},{"type":62,"tag":184,"props":5914,"children":5915},{"style":197},[5916],{"type":67,"value":1394},{"type":62,"tag":184,"props":5918,"children":5919},{"style":1052},[5920],{"type":67,"value":1399},{"type":62,"tag":184,"props":5922,"children":5923},{"style":197},[5924],{"type":67,"value":1361},{"type":62,"tag":184,"props":5926,"children":5927},{"style":259},[5928],{"type":67,"value":312},{"type":62,"tag":184,"props":5930,"children":5931},{"style":197},[5932],{"type":67,"value":317},{"type":62,"tag":184,"props":5934,"children":5935},{"class":186,"line":385},[5936,5940,5944,5948,5952,5956,5960],{"type":62,"tag":184,"props":5937,"children":5938},{"style":191},[5939],{"type":67,"value":1505},{"type":62,"tag":184,"props":5941,"children":5942},{"style":275},[5943],{"type":67,"value":5558},{"type":62,"tag":184,"props":5945,"children":5946},{"style":333},[5947],{"type":67,"value":297},{"type":62,"tag":184,"props":5949,"children":5950},{"style":203},[5951],{"type":67,"value":1333},{"type":62,"tag":184,"props":5953,"children":5954},{"style":197},[5955],{"type":67,"value":287},{"type":62,"tag":184,"props":5957,"children":5958},{"style":203},[5959],{"type":67,"value":1103},{"type":62,"tag":184,"props":5961,"children":5962},{"style":333},[5963],{"type":67,"value":374},{"type":62,"tag":184,"props":5965,"children":5966},{"class":186,"line":394},[5967,5971],{"type":62,"tag":184,"props":5968,"children":5969},{"style":197},[5970],{"type":67,"value":1533},{"type":62,"tag":184,"props":5972,"children":5973},{"style":203},[5974],{"type":67,"value":374},{"type":62,"tag":70,"props":5976,"children":5977},{},[5978],{"type":67,"value":5979},"Static imports of server functions are safe — the build replaces implementations with RPC stubs in client bundles.",{"type":62,"tag":166,"props":5981,"children":5983},{"id":5982},"common-mistakes",[5984],{"type":67,"value":5985},"Common Mistakes",{"type":62,"tag":2840,"props":5987,"children":5989},{"id":5988},"_1-critical-relying-on-a-route-guard-to-protect-a-server-function",[5990],{"type":67,"value":5991},"1. CRITICAL: Relying on a route guard to protect a server function",{"type":62,"tag":70,"props":5993,"children":5994},{},[5995,5997,6002,6004,6009,6011,6016,6018,6023],{"type":67,"value":5996},"A ",{"type":62,"tag":76,"props":5998,"children":6000},{"className":5999},[],[6001],{"type":67,"value":111},{"type":67,"value":6003}," redirect protects the ",{"type":62,"tag":92,"props":6005,"children":6006},{},[6007],{"type":67,"value":6008},"route's UI",{"type":67,"value":6010},", not the ",{"type":62,"tag":92,"props":6012,"children":6013},{},[6014],{"type":67,"value":6015},"data endpoint",{"type":67,"value":6017},". ",{"type":62,"tag":76,"props":6019,"children":6021},{"className":6020},[],[6022],{"type":67,"value":81},{"type":67,"value":6024}," exposes a callable endpoint that an attacker can hit directly — no need to load the route at all. Auth on the endpoint is the security boundary; auth on the route is UX.",{"type":62,"tag":173,"props":6026,"children":6028},{"className":175,"code":6027,"language":177,"meta":178,"style":178},"\u002F\u002F WRONG — the route guard doesn't reach the handler\nconst getMyOrders = createServerFn({ method: 'GET' }).handler(async () => {\n  return db.orders.findMany() \u002F\u002F ← anyone can call the RPC\n})\nexport const Route = createFileRoute('\u002F_authenticated\u002Forders')({\n  beforeLoad: ({ context }) => {\n    if (!context.auth.isAuthenticated) throw redirect({ to: '\u002Flogin' })\n  },\n  loader: () => getMyOrders(),\n})\n\n\u002F\u002F CORRECT — auth enforced on the handler itself\nconst getMyOrders = createServerFn({ method: 'GET' })\n  .middleware([authMiddleware])\n  .handler(async ({ context }) => {\n    return db.orders.findMany({ where: { userId: context.session.userId } })\n  })\n",[6029],{"type":62,"tag":76,"props":6030,"children":6031},{"__ignoreMap":178},[6032,6040,6124,6161,6172,6220,6253,6340,6348,6380,6391,6398,6406,6461,6478,6517,6607],{"type":62,"tag":184,"props":6033,"children":6034},{"class":186,"line":187},[6035],{"type":62,"tag":184,"props":6036,"children":6037},{"style":249},[6038],{"type":67,"value":6039},"\u002F\u002F WRONG — the route guard doesn't reach the handler\n",{"type":62,"tag":184,"props":6041,"children":6042},{"class":186,"line":235},[6043,6047,6052,6056,6060,6064,6068,6072,6076,6080,6084,6088,6092,6096,6100,6104,6108,6112,6116,6120],{"type":62,"tag":184,"props":6044,"children":6045},{"style":259},[6046],{"type":67,"value":262},{"type":62,"tag":184,"props":6048,"children":6049},{"style":203},[6050],{"type":67,"value":6051}," getMyOrders ",{"type":62,"tag":184,"props":6053,"children":6054},{"style":197},[6055],{"type":67,"value":272},{"type":62,"tag":184,"props":6057,"children":6058},{"style":275},[6059],{"type":67,"value":206},{"type":62,"tag":184,"props":6061,"children":6062},{"style":203},[6063],{"type":67,"value":297},{"type":62,"tag":184,"props":6065,"children":6066},{"style":197},[6067],{"type":67,"value":421},{"type":62,"tag":184,"props":6069,"children":6070},{"style":333},[6071],{"type":67,"value":426},{"type":62,"tag":184,"props":6073,"children":6074},{"style":197},[6075],{"type":67,"value":341},{"type":62,"tag":184,"props":6077,"children":6078},{"style":197},[6079],{"type":67,"value":221},{"type":62,"tag":184,"props":6081,"children":6082},{"style":224},[6083],{"type":67,"value":660},{"type":62,"tag":184,"props":6085,"children":6086},{"style":197},[6087],{"type":67,"value":355},{"type":62,"tag":184,"props":6089,"children":6090},{"style":197},[6091],{"type":67,"value":211},{"type":62,"tag":184,"props":6093,"children":6094},{"style":203},[6095],{"type":67,"value":452},{"type":62,"tag":184,"props":6097,"children":6098},{"style":197},[6099],{"type":67,"value":287},{"type":62,"tag":184,"props":6101,"children":6102},{"style":275},[6103],{"type":67,"value":292},{"type":62,"tag":184,"props":6105,"children":6106},{"style":203},[6107],{"type":67,"value":297},{"type":62,"tag":184,"props":6109,"children":6110},{"style":259},[6111],{"type":67,"value":302},{"type":62,"tag":184,"props":6113,"children":6114},{"style":197},[6115],{"type":67,"value":307},{"type":62,"tag":184,"props":6117,"children":6118},{"style":259},[6119],{"type":67,"value":312},{"type":62,"tag":184,"props":6121,"children":6122},{"style":197},[6123],{"type":67,"value":317},{"type":62,"tag":184,"props":6125,"children":6126},{"class":186,"line":245},[6127,6131,6135,6139,6144,6148,6152,6156],{"type":62,"tag":184,"props":6128,"children":6129},{"style":191},[6130],{"type":67,"value":326},{"type":62,"tag":184,"props":6132,"children":6133},{"style":203},[6134],{"type":67,"value":728},{"type":62,"tag":184,"props":6136,"children":6137},{"style":197},[6138],{"type":67,"value":287},{"type":62,"tag":184,"props":6140,"children":6141},{"style":203},[6142],{"type":67,"value":6143},"orders",{"type":62,"tag":184,"props":6145,"children":6146},{"style":197},[6147],{"type":67,"value":287},{"type":62,"tag":184,"props":6149,"children":6150},{"style":275},[6151],{"type":67,"value":1890},{"type":62,"tag":184,"props":6153,"children":6154},{"style":333},[6155],{"type":67,"value":2315},{"type":62,"tag":184,"props":6157,"children":6158},{"style":249},[6159],{"type":67,"value":6160},"\u002F\u002F ← anyone can call the RPC\n",{"type":62,"tag":184,"props":6162,"children":6163},{"class":186,"line":255},[6164,6168],{"type":62,"tag":184,"props":6165,"children":6166},{"style":197},[6167],{"type":67,"value":369},{"type":62,"tag":184,"props":6169,"children":6170},{"style":203},[6171],{"type":67,"value":374},{"type":62,"tag":184,"props":6173,"children":6174},{"class":186,"line":320},[6175,6179,6183,6187,6191,6195,6199,6203,6208,6212,6216],{"type":62,"tag":184,"props":6176,"children":6177},{"style":191},[6178],{"type":67,"value":803},{"type":62,"tag":184,"props":6180,"children":6181},{"style":259},[6182],{"type":67,"value":808},{"type":62,"tag":184,"props":6184,"children":6185},{"style":203},[6186],{"type":67,"value":105},{"type":62,"tag":184,"props":6188,"children":6189},{"style":197},[6190],{"type":67,"value":272},{"type":62,"tag":184,"props":6192,"children":6193},{"style":275},[6194],{"type":67,"value":552},{"type":62,"tag":184,"props":6196,"children":6197},{"style":203},[6198],{"type":67,"value":297},{"type":62,"tag":184,"props":6200,"children":6201},{"style":197},[6202],{"type":67,"value":355},{"type":62,"tag":184,"props":6204,"children":6205},{"style":224},[6206],{"type":67,"value":6207},"\u002F_authenticated\u002Forders",{"type":62,"tag":184,"props":6209,"children":6210},{"style":197},[6211],{"type":67,"value":355},{"type":62,"tag":184,"props":6213,"children":6214},{"style":203},[6215],{"type":67,"value":842},{"type":62,"tag":184,"props":6217,"children":6218},{"style":197},[6219],{"type":67,"value":847},{"type":62,"tag":184,"props":6221,"children":6222},{"class":186,"line":363},[6223,6228,6232,6236,6241,6245,6249],{"type":62,"tag":184,"props":6224,"children":6225},{"style":275},[6226],{"type":67,"value":6227},"  beforeLoad",{"type":62,"tag":184,"props":6229,"children":6230},{"style":197},[6231],{"type":67,"value":341},{"type":62,"tag":184,"props":6233,"children":6234},{"style":197},[6235],{"type":67,"value":1394},{"type":62,"tag":184,"props":6237,"children":6238},{"style":1052},[6239],{"type":67,"value":6240}," context",{"type":62,"tag":184,"props":6242,"children":6243},{"style":197},[6244],{"type":67,"value":1361},{"type":62,"tag":184,"props":6246,"children":6247},{"style":259},[6248],{"type":67,"value":312},{"type":62,"tag":184,"props":6250,"children":6251},{"style":197},[6252],{"type":67,"value":317},{"type":62,"tag":184,"props":6254,"children":6255},{"class":186,"line":377},[6256,6260,6264,6268,6273,6277,6282,6286,6291,6295,6300,6304,6308,6312,6316,6320,6324,6328,6332,6336],{"type":62,"tag":184,"props":6257,"children":6258},{"style":191},[6259],{"type":67,"value":2020},{"type":62,"tag":184,"props":6261,"children":6262},{"style":333},[6263],{"type":67,"value":2671},{"type":62,"tag":184,"props":6265,"children":6266},{"style":197},[6267],{"type":67,"value":3047},{"type":62,"tag":184,"props":6269,"children":6270},{"style":203},[6271],{"type":67,"value":6272},"context",{"type":62,"tag":184,"props":6274,"children":6275},{"style":197},[6276],{"type":67,"value":287},{"type":62,"tag":184,"props":6278,"children":6279},{"style":203},[6280],{"type":67,"value":6281},"auth",{"type":62,"tag":184,"props":6283,"children":6284},{"style":197},[6285],{"type":67,"value":287},{"type":62,"tag":184,"props":6287,"children":6288},{"style":203},[6289],{"type":67,"value":6290},"isAuthenticated",{"type":62,"tag":184,"props":6292,"children":6293},{"style":333},[6294],{"type":67,"value":2119},{"type":62,"tag":184,"props":6296,"children":6297},{"style":191},[6298],{"type":67,"value":6299},"throw",{"type":62,"tag":184,"props":6301,"children":6302},{"style":275},[6303],{"type":67,"value":4230},{"type":62,"tag":184,"props":6305,"children":6306},{"style":333},[6307],{"type":67,"value":297},{"type":62,"tag":184,"props":6309,"children":6310},{"style":197},[6311],{"type":67,"value":421},{"type":62,"tag":184,"props":6313,"children":6314},{"style":333},[6315],{"type":67,"value":4392},{"type":62,"tag":184,"props":6317,"children":6318},{"style":197},[6319],{"type":67,"value":341},{"type":62,"tag":184,"props":6321,"children":6322},{"style":197},[6323],{"type":67,"value":221},{"type":62,"tag":184,"props":6325,"children":6326},{"style":224},[6327],{"type":67,"value":4405},{"type":62,"tag":184,"props":6329,"children":6330},{"style":197},[6331],{"type":67,"value":355},{"type":62,"tag":184,"props":6333,"children":6334},{"style":197},[6335],{"type":67,"value":211},{"type":62,"tag":184,"props":6337,"children":6338},{"style":333},[6339],{"type":67,"value":374},{"type":62,"tag":184,"props":6341,"children":6342},{"class":186,"line":385},[6343],{"type":62,"tag":184,"props":6344,"children":6345},{"style":197},[6346],{"type":67,"value":6347},"  },\n",{"type":62,"tag":184,"props":6349,"children":6350},{"class":186,"line":394},[6351,6355,6359,6363,6367,6372,6376],{"type":62,"tag":184,"props":6352,"children":6353},{"style":275},[6354],{"type":67,"value":855},{"type":62,"tag":184,"props":6356,"children":6357},{"style":197},[6358],{"type":67,"value":341},{"type":62,"tag":184,"props":6360,"children":6361},{"style":197},[6362],{"type":67,"value":307},{"type":62,"tag":184,"props":6364,"children":6365},{"style":259},[6366],{"type":67,"value":312},{"type":62,"tag":184,"props":6368,"children":6369},{"style":275},[6370],{"type":67,"value":6371}," getMyOrders",{"type":62,"tag":184,"props":6373,"children":6374},{"style":203},[6375],{"type":67,"value":282},{"type":62,"tag":184,"props":6377,"children":6378},{"style":197},[6379],{"type":67,"value":881},{"type":62,"tag":184,"props":6381,"children":6382},{"class":186,"line":483},[6383,6387],{"type":62,"tag":184,"props":6384,"children":6385},{"style":197},[6386],{"type":67,"value":369},{"type":62,"tag":184,"props":6388,"children":6389},{"style":203},[6390],{"type":67,"value":374},{"type":62,"tag":184,"props":6392,"children":6393},{"class":186,"line":514},[6394],{"type":62,"tag":184,"props":6395,"children":6396},{"emptyLinePlaceholder":239},[6397],{"type":67,"value":242},{"type":62,"tag":184,"props":6399,"children":6400},{"class":186,"line":905},[6401],{"type":62,"tag":184,"props":6402,"children":6403},{"style":249},[6404],{"type":67,"value":6405},"\u002F\u002F CORRECT — auth enforced on the handler itself\n",{"type":62,"tag":184,"props":6407,"children":6408},{"class":186,"line":917},[6409,6413,6417,6421,6425,6429,6433,6437,6441,6445,6449,6453,6457],{"type":62,"tag":184,"props":6410,"children":6411},{"style":259},[6412],{"type":67,"value":262},{"type":62,"tag":184,"props":6414,"children":6415},{"style":203},[6416],{"type":67,"value":6051},{"type":62,"tag":184,"props":6418,"children":6419},{"style":197},[6420],{"type":67,"value":272},{"type":62,"tag":184,"props":6422,"children":6423},{"style":275},[6424],{"type":67,"value":206},{"type":62,"tag":184,"props":6426,"children":6427},{"style":203},[6428],{"type":67,"value":297},{"type":62,"tag":184,"props":6430,"children":6431},{"style":197},[6432],{"type":67,"value":421},{"type":62,"tag":184,"props":6434,"children":6435},{"style":333},[6436],{"type":67,"value":426},{"type":62,"tag":184,"props":6438,"children":6439},{"style":197},[6440],{"type":67,"value":341},{"type":62,"tag":184,"props":6442,"children":6443},{"style":197},[6444],{"type":67,"value":221},{"type":62,"tag":184,"props":6446,"children":6447},{"style":224},[6448],{"type":67,"value":660},{"type":62,"tag":184,"props":6450,"children":6451},{"style":197},[6452],{"type":67,"value":355},{"type":62,"tag":184,"props":6454,"children":6455},{"style":197},[6456],{"type":67,"value":211},{"type":62,"tag":184,"props":6458,"children":6459},{"style":203},[6460],{"type":67,"value":374},{"type":62,"tag":184,"props":6462,"children":6463},{"class":186,"line":925},[6464,6468,6473],{"type":62,"tag":184,"props":6465,"children":6466},{"style":197},[6467],{"type":67,"value":1315},{"type":62,"tag":184,"props":6469,"children":6470},{"style":275},[6471],{"type":67,"value":6472},"middleware",{"type":62,"tag":184,"props":6474,"children":6475},{"style":203},[6476],{"type":67,"value":6477},"([authMiddleware])\n",{"type":62,"tag":184,"props":6479,"children":6480},{"class":186,"line":946},[6481,6485,6489,6493,6497,6501,6505,6509,6513],{"type":62,"tag":184,"props":6482,"children":6483},{"style":197},[6484],{"type":67,"value":1315},{"type":62,"tag":184,"props":6486,"children":6487},{"style":275},[6488],{"type":67,"value":292},{"type":62,"tag":184,"props":6490,"children":6491},{"style":203},[6492],{"type":67,"value":297},{"type":62,"tag":184,"props":6494,"children":6495},{"style":259},[6496],{"type":67,"value":302},{"type":62,"tag":184,"props":6498,"children":6499},{"style":197},[6500],{"type":67,"value":1394},{"type":62,"tag":184,"props":6502,"children":6503},{"style":1052},[6504],{"type":67,"value":6240},{"type":62,"tag":184,"props":6506,"children":6507},{"style":197},[6508],{"type":67,"value":1361},{"type":62,"tag":184,"props":6510,"children":6511},{"style":259},[6512],{"type":67,"value":312},{"type":62,"tag":184,"props":6514,"children":6515},{"style":197},[6516],{"type":67,"value":317},{"type":62,"tag":184,"props":6518,"children":6519},{"class":186,"line":989},[6520,6524,6528,6532,6536,6540,6544,6548,6552,6556,6560,6564,6569,6573,6577,6581,6586,6590,6595,6599,6603],{"type":62,"tag":184,"props":6521,"children":6522},{"style":191},[6523],{"type":67,"value":1505},{"type":62,"tag":184,"props":6525,"children":6526},{"style":203},[6527],{"type":67,"value":728},{"type":62,"tag":184,"props":6529,"children":6530},{"style":197},[6531],{"type":67,"value":287},{"type":62,"tag":184,"props":6533,"children":6534},{"style":203},[6535],{"type":67,"value":6143},{"type":62,"tag":184,"props":6537,"children":6538},{"style":197},[6539],{"type":67,"value":287},{"type":62,"tag":184,"props":6541,"children":6542},{"style":275},[6543],{"type":67,"value":1890},{"type":62,"tag":184,"props":6545,"children":6546},{"style":333},[6547],{"type":67,"value":297},{"type":62,"tag":184,"props":6549,"children":6550},{"style":197},[6551],{"type":67,"value":421},{"type":62,"tag":184,"props":6553,"children":6554},{"style":333},[6555],{"type":67,"value":5632},{"type":62,"tag":184,"props":6557,"children":6558},{"style":197},[6559],{"type":67,"value":341},{"type":62,"tag":184,"props":6561,"children":6562},{"style":197},[6563],{"type":67,"value":200},{"type":62,"tag":184,"props":6565,"children":6566},{"style":333},[6567],{"type":67,"value":6568}," userId",{"type":62,"tag":184,"props":6570,"children":6571},{"style":197},[6572],{"type":67,"value":341},{"type":62,"tag":184,"props":6574,"children":6575},{"style":203},[6576],{"type":67,"value":6240},{"type":62,"tag":184,"props":6578,"children":6579},{"style":197},[6580],{"type":67,"value":287},{"type":62,"tag":184,"props":6582,"children":6583},{"style":203},[6584],{"type":67,"value":6585},"session",{"type":62,"tag":184,"props":6587,"children":6588},{"style":197},[6589],{"type":67,"value":287},{"type":62,"tag":184,"props":6591,"children":6592},{"style":203},[6593],{"type":67,"value":6594},"userId",{"type":62,"tag":184,"props":6596,"children":6597},{"style":197},[6598],{"type":67,"value":211},{"type":62,"tag":184,"props":6600,"children":6601},{"style":197},[6602],{"type":67,"value":211},{"type":62,"tag":184,"props":6604,"children":6605},{"style":333},[6606],{"type":67,"value":374},{"type":62,"tag":184,"props":6608,"children":6609},{"class":186,"line":1002},[6610,6614],{"type":62,"tag":184,"props":6611,"children":6612},{"style":197},[6613],{"type":67,"value":1533},{"type":62,"tag":184,"props":6615,"children":6616},{"style":203},[6617],{"type":67,"value":374},{"type":62,"tag":70,"props":6619,"children":6620},{},[6621,6623,6629,6631,6636,6638,6643,6645,6649,6651,6657],{"type":67,"value":6622},"Apply ",{"type":62,"tag":76,"props":6624,"children":6626},{"className":6625},[],[6627],{"type":67,"value":6628},"authMiddleware",{"type":67,"value":6630}," (or an equivalent in-handler check) to ",{"type":62,"tag":92,"props":6632,"children":6633},{},[6634],{"type":67,"value":6635},"every",{"type":67,"value":6637}," ",{"type":62,"tag":76,"props":6639,"children":6641},{"className":6640},[],[6642],{"type":67,"value":81},{"type":67,"value":6644}," that needs auth. See ",{"type":62,"tag":115,"props":6646,"children":6647},{"href":117},[6648],{"type":67,"value":120},{"type":67,"value":6650}," for the full session\u002Fmiddleware pattern and ",{"type":62,"tag":115,"props":6652,"children":6654},{"href":6653},"..\u002Fmiddleware\u002FSKILL.md",[6655],{"type":67,"value":6656},"start-core\u002Fmiddleware",{"type":67,"value":6658}," for composing the factory.",{"type":62,"tag":2840,"props":6660,"children":6662},{"id":6661},"_2-critical-putting-server-only-code-in-loaders",[6663],{"type":67,"value":6664},"2. CRITICAL: Putting server-only code in loaders",{"type":62,"tag":173,"props":6666,"children":6668},{"className":175,"code":6667,"language":177,"meta":178,"style":178},"\u002F\u002F WRONG — loader is ISOMORPHIC, runs on BOTH client and server\nexport const Route = createFileRoute('\u002Fposts')({\n  loader: async () => {\n    const posts = await db.query('SELECT * FROM posts')\n    return { posts }\n  },\n})\n\n\u002F\u002F CORRECT — use createServerFn for server-only logic\nconst getPosts = createServerFn({ method: 'GET' }).handler(async () => {\n  const posts = await db.query('SELECT * FROM posts')\n  return { posts }\n})\n\nexport const Route = createFileRoute('\u002Fposts')({\n  loader: () => getPosts(),\n})\n",[6669],{"type":62,"tag":76,"props":6670,"children":6671},{"__ignoreMap":178},[6672,6680,6727,6754,6805,6824,6831,6842,6849,6857,6940,6991,7010,7021,7028,7075,7106],{"type":62,"tag":184,"props":6673,"children":6674},{"class":186,"line":187},[6675],{"type":62,"tag":184,"props":6676,"children":6677},{"style":249},[6678],{"type":67,"value":6679},"\u002F\u002F WRONG — loader is ISOMORPHIC, runs on BOTH client and server\n",{"type":62,"tag":184,"props":6681,"children":6682},{"class":186,"line":235},[6683,6687,6691,6695,6699,6703,6707,6711,6715,6719,6723],{"type":62,"tag":184,"props":6684,"children":6685},{"style":191},[6686],{"type":67,"value":803},{"type":62,"tag":184,"props":6688,"children":6689},{"style":259},[6690],{"type":67,"value":808},{"type":62,"tag":184,"props":6692,"children":6693},{"style":203},[6694],{"type":67,"value":105},{"type":62,"tag":184,"props":6696,"children":6697},{"style":197},[6698],{"type":67,"value":272},{"type":62,"tag":184,"props":6700,"children":6701},{"style":275},[6702],{"type":67,"value":552},{"type":62,"tag":184,"props":6704,"children":6705},{"style":203},[6706],{"type":67,"value":297},{"type":62,"tag":184,"props":6708,"children":6709},{"style":197},[6710],{"type":67,"value":355},{"type":62,"tag":184,"props":6712,"children":6713},{"style":224},[6714],{"type":67,"value":833},{"type":62,"tag":184,"props":6716,"children":6717},{"style":197},[6718],{"type":67,"value":355},{"type":62,"tag":184,"props":6720,"children":6721},{"style":203},[6722],{"type":67,"value":842},{"type":62,"tag":184,"props":6724,"children":6725},{"style":197},[6726],{"type":67,"value":847},{"type":62,"tag":184,"props":6728,"children":6729},{"class":186,"line":245},[6730,6734,6738,6742,6746,6750],{"type":62,"tag":184,"props":6731,"children":6732},{"style":275},[6733],{"type":67,"value":855},{"type":62,"tag":184,"props":6735,"children":6736},{"style":197},[6737],{"type":67,"value":341},{"type":62,"tag":184,"props":6739,"children":6740},{"style":259},[6741],{"type":67,"value":2666},{"type":62,"tag":184,"props":6743,"children":6744},{"style":197},[6745],{"type":67,"value":307},{"type":62,"tag":184,"props":6747,"children":6748},{"style":259},[6749],{"type":67,"value":312},{"type":62,"tag":184,"props":6751,"children":6752},{"style":197},[6753],{"type":67,"value":317},{"type":62,"tag":184,"props":6755,"children":6756},{"class":186,"line":255},[6757,6761,6765,6769,6773,6777,6781,6785,6789,6793,6797,6801],{"type":62,"tag":184,"props":6758,"children":6759},{"style":259},[6760],{"type":67,"value":4629},{"type":62,"tag":184,"props":6762,"children":6763},{"style":203},[6764],{"type":67,"value":713},{"type":62,"tag":184,"props":6766,"children":6767},{"style":197},[6768],{"type":67,"value":718},{"type":62,"tag":184,"props":6770,"children":6771},{"style":191},[6772],{"type":67,"value":723},{"type":62,"tag":184,"props":6774,"children":6775},{"style":203},[6776],{"type":67,"value":728},{"type":62,"tag":184,"props":6778,"children":6779},{"style":197},[6780],{"type":67,"value":287},{"type":62,"tag":184,"props":6782,"children":6783},{"style":275},[6784],{"type":67,"value":737},{"type":62,"tag":184,"props":6786,"children":6787},{"style":333},[6788],{"type":67,"value":297},{"type":62,"tag":184,"props":6790,"children":6791},{"style":197},[6792],{"type":67,"value":355},{"type":62,"tag":184,"props":6794,"children":6795},{"style":224},[6796],{"type":67,"value":750},{"type":62,"tag":184,"props":6798,"children":6799},{"style":197},[6800],{"type":67,"value":355},{"type":62,"tag":184,"props":6802,"children":6803},{"style":333},[6804],{"type":67,"value":374},{"type":62,"tag":184,"props":6806,"children":6807},{"class":186,"line":320},[6808,6812,6816,6820],{"type":62,"tag":184,"props":6809,"children":6810},{"style":191},[6811],{"type":67,"value":1505},{"type":62,"tag":184,"props":6813,"children":6814},{"style":197},[6815],{"type":67,"value":200},{"type":62,"tag":184,"props":6817,"children":6818},{"style":203},[6819],{"type":67,"value":713},{"type":62,"tag":184,"props":6821,"children":6822},{"style":197},[6823],{"type":67,"value":360},{"type":62,"tag":184,"props":6825,"children":6826},{"class":186,"line":363},[6827],{"type":62,"tag":184,"props":6828,"children":6829},{"style":197},[6830],{"type":67,"value":6347},{"type":62,"tag":184,"props":6832,"children":6833},{"class":186,"line":377},[6834,6838],{"type":62,"tag":184,"props":6835,"children":6836},{"style":197},[6837],{"type":67,"value":369},{"type":62,"tag":184,"props":6839,"children":6840},{"style":203},[6841],{"type":67,"value":374},{"type":62,"tag":184,"props":6843,"children":6844},{"class":186,"line":385},[6845],{"type":62,"tag":184,"props":6846,"children":6847},{"emptyLinePlaceholder":239},[6848],{"type":67,"value":242},{"type":62,"tag":184,"props":6850,"children":6851},{"class":186,"line":394},[6852],{"type":62,"tag":184,"props":6853,"children":6854},{"style":249},[6855],{"type":67,"value":6856},"\u002F\u002F CORRECT — use createServerFn for server-only logic\n",{"type":62,"tag":184,"props":6858,"children":6859},{"class":186,"line":483},[6860,6864,6868,6872,6876,6880,6884,6888,6892,6896,6900,6904,6908,6912,6916,6920,6924,6928,6932,6936],{"type":62,"tag":184,"props":6861,"children":6862},{"style":259},[6863],{"type":67,"value":262},{"type":62,"tag":184,"props":6865,"children":6866},{"style":203},[6867],{"type":67,"value":627},{"type":62,"tag":184,"props":6869,"children":6870},{"style":197},[6871],{"type":67,"value":272},{"type":62,"tag":184,"props":6873,"children":6874},{"style":275},[6875],{"type":67,"value":206},{"type":62,"tag":184,"props":6877,"children":6878},{"style":203},[6879],{"type":67,"value":297},{"type":62,"tag":184,"props":6881,"children":6882},{"style":197},[6883],{"type":67,"value":421},{"type":62,"tag":184,"props":6885,"children":6886},{"style":333},[6887],{"type":67,"value":426},{"type":62,"tag":184,"props":6889,"children":6890},{"style":197},[6891],{"type":67,"value":341},{"type":62,"tag":184,"props":6893,"children":6894},{"style":197},[6895],{"type":67,"value":221},{"type":62,"tag":184,"props":6897,"children":6898},{"style":224},[6899],{"type":67,"value":660},{"type":62,"tag":184,"props":6901,"children":6902},{"style":197},[6903],{"type":67,"value":355},{"type":62,"tag":184,"props":6905,"children":6906},{"style":197},[6907],{"type":67,"value":211},{"type":62,"tag":184,"props":6909,"children":6910},{"style":203},[6911],{"type":67,"value":452},{"type":62,"tag":184,"props":6913,"children":6914},{"style":197},[6915],{"type":67,"value":287},{"type":62,"tag":184,"props":6917,"children":6918},{"style":275},[6919],{"type":67,"value":292},{"type":62,"tag":184,"props":6921,"children":6922},{"style":203},[6923],{"type":67,"value":297},{"type":62,"tag":184,"props":6925,"children":6926},{"style":259},[6927],{"type":67,"value":302},{"type":62,"tag":184,"props":6929,"children":6930},{"style":197},[6931],{"type":67,"value":307},{"type":62,"tag":184,"props":6933,"children":6934},{"style":259},[6935],{"type":67,"value":312},{"type":62,"tag":184,"props":6937,"children":6938},{"style":197},[6939],{"type":67,"value":317},{"type":62,"tag":184,"props":6941,"children":6942},{"class":186,"line":514},[6943,6947,6951,6955,6959,6963,6967,6971,6975,6979,6983,6987],{"type":62,"tag":184,"props":6944,"children":6945},{"style":259},[6946],{"type":67,"value":708},{"type":62,"tag":184,"props":6948,"children":6949},{"style":203},[6950],{"type":67,"value":713},{"type":62,"tag":184,"props":6952,"children":6953},{"style":197},[6954],{"type":67,"value":718},{"type":62,"tag":184,"props":6956,"children":6957},{"style":191},[6958],{"type":67,"value":723},{"type":62,"tag":184,"props":6960,"children":6961},{"style":203},[6962],{"type":67,"value":728},{"type":62,"tag":184,"props":6964,"children":6965},{"style":197},[6966],{"type":67,"value":287},{"type":62,"tag":184,"props":6968,"children":6969},{"style":275},[6970],{"type":67,"value":737},{"type":62,"tag":184,"props":6972,"children":6973},{"style":333},[6974],{"type":67,"value":297},{"type":62,"tag":184,"props":6976,"children":6977},{"style":197},[6978],{"type":67,"value":355},{"type":62,"tag":184,"props":6980,"children":6981},{"style":224},[6982],{"type":67,"value":750},{"type":62,"tag":184,"props":6984,"children":6985},{"style":197},[6986],{"type":67,"value":355},{"type":62,"tag":184,"props":6988,"children":6989},{"style":333},[6990],{"type":67,"value":374},{"type":62,"tag":184,"props":6992,"children":6993},{"class":186,"line":905},[6994,6998,7002,7006],{"type":62,"tag":184,"props":6995,"children":6996},{"style":191},[6997],{"type":67,"value":326},{"type":62,"tag":184,"props":6999,"children":7000},{"style":197},[7001],{"type":67,"value":200},{"type":62,"tag":184,"props":7003,"children":7004},{"style":203},[7005],{"type":67,"value":713},{"type":62,"tag":184,"props":7007,"children":7008},{"style":197},[7009],{"type":67,"value":360},{"type":62,"tag":184,"props":7011,"children":7012},{"class":186,"line":917},[7013,7017],{"type":62,"tag":184,"props":7014,"children":7015},{"style":197},[7016],{"type":67,"value":369},{"type":62,"tag":184,"props":7018,"children":7019},{"style":203},[7020],{"type":67,"value":374},{"type":62,"tag":184,"props":7022,"children":7023},{"class":186,"line":925},[7024],{"type":62,"tag":184,"props":7025,"children":7026},{"emptyLinePlaceholder":239},[7027],{"type":67,"value":242},{"type":62,"tag":184,"props":7029,"children":7030},{"class":186,"line":946},[7031,7035,7039,7043,7047,7051,7055,7059,7063,7067,7071],{"type":62,"tag":184,"props":7032,"children":7033},{"style":191},[7034],{"type":67,"value":803},{"type":62,"tag":184,"props":7036,"children":7037},{"style":259},[7038],{"type":67,"value":808},{"type":62,"tag":184,"props":7040,"children":7041},{"style":203},[7042],{"type":67,"value":105},{"type":62,"tag":184,"props":7044,"children":7045},{"style":197},[7046],{"type":67,"value":272},{"type":62,"tag":184,"props":7048,"children":7049},{"style":275},[7050],{"type":67,"value":552},{"type":62,"tag":184,"props":7052,"children":7053},{"style":203},[7054],{"type":67,"value":297},{"type":62,"tag":184,"props":7056,"children":7057},{"style":197},[7058],{"type":67,"value":355},{"type":62,"tag":184,"props":7060,"children":7061},{"style":224},[7062],{"type":67,"value":833},{"type":62,"tag":184,"props":7064,"children":7065},{"style":197},[7066],{"type":67,"value":355},{"type":62,"tag":184,"props":7068,"children":7069},{"style":203},[7070],{"type":67,"value":842},{"type":62,"tag":184,"props":7072,"children":7073},{"style":197},[7074],{"type":67,"value":847},{"type":62,"tag":184,"props":7076,"children":7077},{"class":186,"line":989},[7078,7082,7086,7090,7094,7098,7102],{"type":62,"tag":184,"props":7079,"children":7080},{"style":275},[7081],{"type":67,"value":855},{"type":62,"tag":184,"props":7083,"children":7084},{"style":197},[7085],{"type":67,"value":341},{"type":62,"tag":184,"props":7087,"children":7088},{"style":197},[7089],{"type":67,"value":307},{"type":62,"tag":184,"props":7091,"children":7092},{"style":259},[7093],{"type":67,"value":312},{"type":62,"tag":184,"props":7095,"children":7096},{"style":275},[7097],{"type":67,"value":872},{"type":62,"tag":184,"props":7099,"children":7100},{"style":203},[7101],{"type":67,"value":282},{"type":62,"tag":184,"props":7103,"children":7104},{"style":197},[7105],{"type":67,"value":881},{"type":62,"tag":184,"props":7107,"children":7108},{"class":186,"line":1002},[7109,7113],{"type":62,"tag":184,"props":7110,"children":7111},{"style":197},[7112],{"type":67,"value":369},{"type":62,"tag":184,"props":7114,"children":7115},{"style":203},[7116],{"type":67,"value":374},{"type":62,"tag":2840,"props":7118,"children":7120},{"id":7119},"_3-critical-using-nextjs-remix-react-router-dom-patterns",[7121],{"type":67,"value":7122},"3. CRITICAL: Using Next.js \u002F Remix \u002F React Router DOM patterns",{"type":62,"tag":70,"props":7124,"children":7125},{},[7126,7128,7134,7136,7142,7143,7149,7151,7157,7159,7165,7167,7173,7175,7181,7182,7187],{"type":67,"value":7127},"If the file lives at ",{"type":62,"tag":76,"props":7129,"children":7131},{"className":7130},[],[7132],{"type":67,"value":7133},"src\u002Fpages\u002F",{"type":67,"value":7135},", ",{"type":62,"tag":76,"props":7137,"children":7139},{"className":7138},[],[7140],{"type":67,"value":7141},"app\u002Flayout.tsx",{"type":67,"value":7135},{"type":62,"tag":76,"props":7144,"children":7146},{"className":7145},[],[7147],{"type":67,"value":7148},"_app\u002F",{"type":67,"value":7150},", or imports anything from ",{"type":62,"tag":76,"props":7152,"children":7154},{"className":7153},[],[7155],{"type":67,"value":7156},"react-router-dom",{"type":67,"value":7158}," or ",{"type":62,"tag":76,"props":7160,"children":7162},{"className":7161},[],[7163],{"type":67,"value":7164},"next\u002F",{"type":67,"value":7166},", it is wrong-framework code. TanStack Start uses ",{"type":62,"tag":76,"props":7168,"children":7170},{"className":7169},[],[7171],{"type":67,"value":7172},"src\u002Froutes\u002F",{"type":67,"value":7174}," + ",{"type":62,"tag":76,"props":7176,"children":7178},{"className":7177},[],[7179],{"type":67,"value":7180},"createFileRoute",{"type":67,"value":7174},{"type":62,"tag":76,"props":7183,"children":7185},{"className":7184},[],[7186],{"type":67,"value":81},{"type":67,"value":287},{"type":62,"tag":173,"props":7189,"children":7191},{"className":175,"code":7190,"language":177,"meta":178,"style":178},"\u002F\u002F WRONG — \"use server\" is a React directive, not used in TanStack Start\n'use server'\nexport async function getUser() { ... }\n\n\u002F\u002F WRONG — getServerSideProps is Next.js Pages Router\nexport async function getServerSideProps() { ... }\n\n\u002F\u002F WRONG — Next.js App Router server component data fetching\nexport default async function Page() {\n  const data = await fetch(...).then(r => r.json())\n  return \u003Cdiv>{data}\u003C\u002Fdiv>\n}\n\n\u002F\u002F WRONG — Remix\nexport async function loader({ request }) { ... }\nexport async function action({ request }) { ... }\n\n\u002F\u002F WRONG — react-router-dom (a different library)\nimport { Link, useNavigate } from 'react-router-dom'\n\n\u002F\u002F CORRECT — TanStack Start\nimport { createServerFn } from '@tanstack\u002Freact-start'\nimport { Link, useNavigate, createFileRoute } from '@tanstack\u002Freact-router'\n\nconst getUser = createServerFn({ method: 'GET' })\n  .handler(async () => { ... })\n\nexport const Route = createFileRoute('\u002Fusers\u002F$id')({\n  loader: ({ params }) => getUser({ data: { id: params.id } }),\n  component: UserPage,\n})\n",[7192],{"type":62,"tag":76,"props":7193,"children":7194},{"__ignoreMap":178},[7195,7203,7219,7256,7263,7271,7307,7314,7322,7355,7433,7471,7478,7485,7493,7538,7582,7589,7597,7642,7649,7657,7692,7743,7750,7805,7848,7855,7903,7992,8012],{"type":62,"tag":184,"props":7196,"children":7197},{"class":186,"line":187},[7198],{"type":62,"tag":184,"props":7199,"children":7200},{"style":249},[7201],{"type":67,"value":7202},"\u002F\u002F WRONG — \"use server\" is a React directive, not used in TanStack Start\n",{"type":62,"tag":184,"props":7204,"children":7205},{"class":186,"line":235},[7206,7210,7215],{"type":62,"tag":184,"props":7207,"children":7208},{"style":197},[7209],{"type":67,"value":355},{"type":62,"tag":184,"props":7211,"children":7212},{"style":224},[7213],{"type":67,"value":7214},"use server",{"type":62,"tag":184,"props":7216,"children":7217},{"style":197},[7218],{"type":67,"value":232},{"type":62,"tag":184,"props":7220,"children":7221},{"class":186,"line":245},[7222,7226,7230,7234,7239,7243,7247,7252],{"type":62,"tag":184,"props":7223,"children":7224},{"style":191},[7225],{"type":67,"value":803},{"type":62,"tag":184,"props":7227,"children":7228},{"style":259},[7229],{"type":67,"value":2666},{"type":62,"tag":184,"props":7231,"children":7232},{"style":259},[7233],{"type":67,"value":5553},{"type":62,"tag":184,"props":7235,"children":7236},{"style":275},[7237],{"type":67,"value":7238}," getUser",{"type":62,"tag":184,"props":7240,"children":7241},{"style":197},[7242],{"type":67,"value":282},{"type":62,"tag":184,"props":7244,"children":7245},{"style":197},[7246],{"type":67,"value":200},{"type":62,"tag":184,"props":7248,"children":7249},{"style":197},[7250],{"type":67,"value":7251}," ...",{"type":62,"tag":184,"props":7253,"children":7254},{"style":197},[7255],{"type":67,"value":360},{"type":62,"tag":184,"props":7257,"children":7258},{"class":186,"line":255},[7259],{"type":62,"tag":184,"props":7260,"children":7261},{"emptyLinePlaceholder":239},[7262],{"type":67,"value":242},{"type":62,"tag":184,"props":7264,"children":7265},{"class":186,"line":320},[7266],{"type":62,"tag":184,"props":7267,"children":7268},{"style":249},[7269],{"type":67,"value":7270},"\u002F\u002F WRONG — getServerSideProps is Next.js Pages Router\n",{"type":62,"tag":184,"props":7272,"children":7273},{"class":186,"line":363},[7274,7278,7282,7286,7291,7295,7299,7303],{"type":62,"tag":184,"props":7275,"children":7276},{"style":191},[7277],{"type":67,"value":803},{"type":62,"tag":184,"props":7279,"children":7280},{"style":259},[7281],{"type":67,"value":2666},{"type":62,"tag":184,"props":7283,"children":7284},{"style":259},[7285],{"type":67,"value":5553},{"type":62,"tag":184,"props":7287,"children":7288},{"style":275},[7289],{"type":67,"value":7290}," getServerSideProps",{"type":62,"tag":184,"props":7292,"children":7293},{"style":197},[7294],{"type":67,"value":282},{"type":62,"tag":184,"props":7296,"children":7297},{"style":197},[7298],{"type":67,"value":200},{"type":62,"tag":184,"props":7300,"children":7301},{"style":197},[7302],{"type":67,"value":7251},{"type":62,"tag":184,"props":7304,"children":7305},{"style":197},[7306],{"type":67,"value":360},{"type":62,"tag":184,"props":7308,"children":7309},{"class":186,"line":377},[7310],{"type":62,"tag":184,"props":7311,"children":7312},{"emptyLinePlaceholder":239},[7313],{"type":67,"value":242},{"type":62,"tag":184,"props":7315,"children":7316},{"class":186,"line":385},[7317],{"type":62,"tag":184,"props":7318,"children":7319},{"style":249},[7320],{"type":67,"value":7321},"\u002F\u002F WRONG — Next.js App Router server component data fetching\n",{"type":62,"tag":184,"props":7323,"children":7324},{"class":186,"line":394},[7325,7329,7334,7338,7342,7347,7351],{"type":62,"tag":184,"props":7326,"children":7327},{"style":191},[7328],{"type":67,"value":803},{"type":62,"tag":184,"props":7330,"children":7331},{"style":191},[7332],{"type":67,"value":7333}," default",{"type":62,"tag":184,"props":7335,"children":7336},{"style":259},[7337],{"type":67,"value":2666},{"type":62,"tag":184,"props":7339,"children":7340},{"style":259},[7341],{"type":67,"value":5553},{"type":62,"tag":184,"props":7343,"children":7344},{"style":275},[7345],{"type":67,"value":7346}," Page",{"type":62,"tag":184,"props":7348,"children":7349},{"style":197},[7350],{"type":67,"value":282},{"type":62,"tag":184,"props":7352,"children":7353},{"style":197},[7354],{"type":67,"value":317},{"type":62,"tag":184,"props":7356,"children":7357},{"class":186,"line":483},[7358,7362,7366,7370,7374,7379,7383,7388,7392,7396,7401,7405,7410,7414,7419,7423,7428],{"type":62,"tag":184,"props":7359,"children":7360},{"style":259},[7361],{"type":67,"value":708},{"type":62,"tag":184,"props":7363,"children":7364},{"style":203},[7365],{"type":67,"value":1399},{"type":62,"tag":184,"props":7367,"children":7368},{"style":197},[7369],{"type":67,"value":718},{"type":62,"tag":184,"props":7371,"children":7372},{"style":191},[7373],{"type":67,"value":723},{"type":62,"tag":184,"props":7375,"children":7376},{"style":275},[7377],{"type":67,"value":7378}," fetch",{"type":62,"tag":184,"props":7380,"children":7381},{"style":333},[7382],{"type":67,"value":297},{"type":62,"tag":184,"props":7384,"children":7385},{"style":197},[7386],{"type":67,"value":7387},"...",{"type":62,"tag":184,"props":7389,"children":7390},{"style":333},[7391],{"type":67,"value":452},{"type":62,"tag":184,"props":7393,"children":7394},{"style":197},[7395],{"type":67,"value":287},{"type":62,"tag":184,"props":7397,"children":7398},{"style":275},[7399],{"type":67,"value":7400},"then",{"type":62,"tag":184,"props":7402,"children":7403},{"style":333},[7404],{"type":67,"value":297},{"type":62,"tag":184,"props":7406,"children":7407},{"style":1052},[7408],{"type":67,"value":7409},"r",{"type":62,"tag":184,"props":7411,"children":7412},{"style":259},[7413],{"type":67,"value":312},{"type":62,"tag":184,"props":7415,"children":7416},{"style":203},[7417],{"type":67,"value":7418}," r",{"type":62,"tag":184,"props":7420,"children":7421},{"style":197},[7422],{"type":67,"value":287},{"type":62,"tag":184,"props":7424,"children":7425},{"style":275},[7426],{"type":67,"value":7427},"json",{"type":62,"tag":184,"props":7429,"children":7430},{"style":333},[7431],{"type":67,"value":7432},"())\n",{"type":62,"tag":184,"props":7434,"children":7435},{"class":186,"line":514},[7436,7440,7445,7450,7455,7459,7463,7467],{"type":62,"tag":184,"props":7437,"children":7438},{"style":191},[7439],{"type":67,"value":326},{"type":62,"tag":184,"props":7441,"children":7442},{"style":197},[7443],{"type":67,"value":7444}," \u003C",{"type":62,"tag":184,"props":7446,"children":7447},{"style":333},[7448],{"type":67,"value":7449},"div",{"type":62,"tag":184,"props":7451,"children":7452},{"style":197},[7453],{"type":67,"value":7454},">{",{"type":62,"tag":184,"props":7456,"children":7457},{"style":203},[7458],{"type":67,"value":1333},{"type":62,"tag":184,"props":7460,"children":7461},{"style":197},[7462],{"type":67,"value":1126},{"type":62,"tag":184,"props":7464,"children":7465},{"style":333},[7466],{"type":67,"value":7449},{"type":62,"tag":184,"props":7468,"children":7469},{"style":197},[7470],{"type":67,"value":1018},{"type":62,"tag":184,"props":7472,"children":7473},{"class":186,"line":905},[7474],{"type":62,"tag":184,"props":7475,"children":7476},{"style":197},[7477],{"type":67,"value":1148},{"type":62,"tag":184,"props":7479,"children":7480},{"class":186,"line":917},[7481],{"type":62,"tag":184,"props":7482,"children":7483},{"emptyLinePlaceholder":239},[7484],{"type":67,"value":242},{"type":62,"tag":184,"props":7486,"children":7487},{"class":186,"line":925},[7488],{"type":62,"tag":184,"props":7489,"children":7490},{"style":249},[7491],{"type":67,"value":7492},"\u002F\u002F WRONG — Remix\n",{"type":62,"tag":184,"props":7494,"children":7495},{"class":186,"line":946},[7496,7500,7504,7508,7513,7517,7522,7526,7530,7534],{"type":62,"tag":184,"props":7497,"children":7498},{"style":191},[7499],{"type":67,"value":803},{"type":62,"tag":184,"props":7501,"children":7502},{"style":259},[7503],{"type":67,"value":2666},{"type":62,"tag":184,"props":7505,"children":7506},{"style":259},[7507],{"type":67,"value":5553},{"type":62,"tag":184,"props":7509,"children":7510},{"style":275},[7511],{"type":67,"value":7512}," loader",{"type":62,"tag":184,"props":7514,"children":7515},{"style":197},[7516],{"type":67,"value":1561},{"type":62,"tag":184,"props":7518,"children":7519},{"style":1052},[7520],{"type":67,"value":7521}," request",{"type":62,"tag":184,"props":7523,"children":7524},{"style":197},[7525],{"type":67,"value":1361},{"type":62,"tag":184,"props":7527,"children":7528},{"style":197},[7529],{"type":67,"value":200},{"type":62,"tag":184,"props":7531,"children":7532},{"style":197},[7533],{"type":67,"value":7251},{"type":62,"tag":184,"props":7535,"children":7536},{"style":197},[7537],{"type":67,"value":360},{"type":62,"tag":184,"props":7539,"children":7540},{"class":186,"line":989},[7541,7545,7549,7553,7558,7562,7566,7570,7574,7578],{"type":62,"tag":184,"props":7542,"children":7543},{"style":191},[7544],{"type":67,"value":803},{"type":62,"tag":184,"props":7546,"children":7547},{"style":259},[7548],{"type":67,"value":2666},{"type":62,"tag":184,"props":7550,"children":7551},{"style":259},[7552],{"type":67,"value":5553},{"type":62,"tag":184,"props":7554,"children":7555},{"style":275},[7556],{"type":67,"value":7557}," action",{"type":62,"tag":184,"props":7559,"children":7560},{"style":197},[7561],{"type":67,"value":1561},{"type":62,"tag":184,"props":7563,"children":7564},{"style":1052},[7565],{"type":67,"value":7521},{"type":62,"tag":184,"props":7567,"children":7568},{"style":197},[7569],{"type":67,"value":1361},{"type":62,"tag":184,"props":7571,"children":7572},{"style":197},[7573],{"type":67,"value":200},{"type":62,"tag":184,"props":7575,"children":7576},{"style":197},[7577],{"type":67,"value":7251},{"type":62,"tag":184,"props":7579,"children":7580},{"style":197},[7581],{"type":67,"value":360},{"type":62,"tag":184,"props":7583,"children":7584},{"class":186,"line":1002},[7585],{"type":62,"tag":184,"props":7586,"children":7587},{"emptyLinePlaceholder":239},[7588],{"type":67,"value":242},{"type":62,"tag":184,"props":7590,"children":7591},{"class":186,"line":1021},[7592],{"type":62,"tag":184,"props":7593,"children":7594},{"style":249},[7595],{"type":67,"value":7596},"\u002F\u002F WRONG — react-router-dom (a different library)\n",{"type":62,"tag":184,"props":7598,"children":7599},{"class":186,"line":1069},[7600,7604,7608,7613,7617,7622,7626,7630,7634,7638],{"type":62,"tag":184,"props":7601,"children":7602},{"style":191},[7603],{"type":67,"value":194},{"type":62,"tag":184,"props":7605,"children":7606},{"style":197},[7607],{"type":67,"value":200},{"type":62,"tag":184,"props":7609,"children":7610},{"style":203},[7611],{"type":67,"value":7612}," Link",{"type":62,"tag":184,"props":7614,"children":7615},{"style":197},[7616],{"type":67,"value":5662},{"type":62,"tag":184,"props":7618,"children":7619},{"style":203},[7620],{"type":67,"value":7621}," useNavigate",{"type":62,"tag":184,"props":7623,"children":7624},{"style":197},[7625],{"type":67,"value":211},{"type":62,"tag":184,"props":7627,"children":7628},{"style":191},[7629],{"type":67,"value":216},{"type":62,"tag":184,"props":7631,"children":7632},{"style":197},[7633],{"type":67,"value":221},{"type":62,"tag":184,"props":7635,"children":7636},{"style":224},[7637],{"type":67,"value":7156},{"type":62,"tag":184,"props":7639,"children":7640},{"style":197},[7641],{"type":67,"value":232},{"type":62,"tag":184,"props":7643,"children":7644},{"class":186,"line":1137},[7645],{"type":62,"tag":184,"props":7646,"children":7647},{"emptyLinePlaceholder":239},[7648],{"type":67,"value":242},{"type":62,"tag":184,"props":7650,"children":7651},{"class":186,"line":1151},[7652],{"type":62,"tag":184,"props":7653,"children":7654},{"style":249},[7655],{"type":67,"value":7656},"\u002F\u002F CORRECT — TanStack Start\n",{"type":62,"tag":184,"props":7658,"children":7659},{"class":186,"line":1168},[7660,7664,7668,7672,7676,7680,7684,7688],{"type":62,"tag":184,"props":7661,"children":7662},{"style":191},[7663],{"type":67,"value":194},{"type":62,"tag":184,"props":7665,"children":7666},{"style":197},[7667],{"type":67,"value":200},{"type":62,"tag":184,"props":7669,"children":7670},{"style":203},[7671],{"type":67,"value":206},{"type":62,"tag":184,"props":7673,"children":7674},{"style":197},[7675],{"type":67,"value":211},{"type":62,"tag":184,"props":7677,"children":7678},{"style":191},[7679],{"type":67,"value":216},{"type":62,"tag":184,"props":7681,"children":7682},{"style":197},[7683],{"type":67,"value":221},{"type":62,"tag":184,"props":7685,"children":7686},{"style":224},[7687],{"type":67,"value":227},{"type":62,"tag":184,"props":7689,"children":7690},{"style":197},[7691],{"type":67,"value":232},{"type":62,"tag":184,"props":7693,"children":7694},{"class":186,"line":1177},[7695,7699,7703,7707,7711,7715,7719,7723,7727,7731,7735,7739],{"type":62,"tag":184,"props":7696,"children":7697},{"style":191},[7698],{"type":67,"value":194},{"type":62,"tag":184,"props":7700,"children":7701},{"style":197},[7702],{"type":67,"value":200},{"type":62,"tag":184,"props":7704,"children":7705},{"style":203},[7706],{"type":67,"value":7612},{"type":62,"tag":184,"props":7708,"children":7709},{"style":197},[7710],{"type":67,"value":5662},{"type":62,"tag":184,"props":7712,"children":7713},{"style":203},[7714],{"type":67,"value":7621},{"type":62,"tag":184,"props":7716,"children":7717},{"style":197},[7718],{"type":67,"value":5662},{"type":62,"tag":184,"props":7720,"children":7721},{"style":203},[7722],{"type":67,"value":552},{"type":62,"tag":184,"props":7724,"children":7725},{"style":197},[7726],{"type":67,"value":211},{"type":62,"tag":184,"props":7728,"children":7729},{"style":191},[7730],{"type":67,"value":216},{"type":62,"tag":184,"props":7732,"children":7733},{"style":197},[7734],{"type":67,"value":221},{"type":62,"tag":184,"props":7736,"children":7737},{"style":224},[7738],{"type":67,"value":569},{"type":62,"tag":184,"props":7740,"children":7741},{"style":197},[7742],{"type":67,"value":232},{"type":62,"tag":184,"props":7744,"children":7745},{"class":186,"line":2518},[7746],{"type":62,"tag":184,"props":7747,"children":7748},{"emptyLinePlaceholder":239},[7749],{"type":67,"value":242},{"type":62,"tag":184,"props":7751,"children":7752},{"class":186,"line":2539},[7753,7757,7761,7765,7769,7773,7777,7781,7785,7789,7793,7797,7801],{"type":62,"tag":184,"props":7754,"children":7755},{"style":259},[7756],{"type":67,"value":262},{"type":62,"tag":184,"props":7758,"children":7759},{"style":203},[7760],{"type":67,"value":5794},{"type":62,"tag":184,"props":7762,"children":7763},{"style":197},[7764],{"type":67,"value":272},{"type":62,"tag":184,"props":7766,"children":7767},{"style":275},[7768],{"type":67,"value":206},{"type":62,"tag":184,"props":7770,"children":7771},{"style":203},[7772],{"type":67,"value":297},{"type":62,"tag":184,"props":7774,"children":7775},{"style":197},[7776],{"type":67,"value":421},{"type":62,"tag":184,"props":7778,"children":7779},{"style":333},[7780],{"type":67,"value":426},{"type":62,"tag":184,"props":7782,"children":7783},{"style":197},[7784],{"type":67,"value":341},{"type":62,"tag":184,"props":7786,"children":7787},{"style":197},[7788],{"type":67,"value":221},{"type":62,"tag":184,"props":7790,"children":7791},{"style":224},[7792],{"type":67,"value":660},{"type":62,"tag":184,"props":7794,"children":7795},{"style":197},[7796],{"type":67,"value":355},{"type":62,"tag":184,"props":7798,"children":7799},{"style":197},[7800],{"type":67,"value":211},{"type":62,"tag":184,"props":7802,"children":7803},{"style":203},[7804],{"type":67,"value":374},{"type":62,"tag":184,"props":7806,"children":7807},{"class":186,"line":2551},[7808,7812,7816,7820,7824,7828,7832,7836,7840,7844],{"type":62,"tag":184,"props":7809,"children":7810},{"style":197},[7811],{"type":67,"value":1315},{"type":62,"tag":184,"props":7813,"children":7814},{"style":275},[7815],{"type":67,"value":292},{"type":62,"tag":184,"props":7817,"children":7818},{"style":203},[7819],{"type":67,"value":297},{"type":62,"tag":184,"props":7821,"children":7822},{"style":259},[7823],{"type":67,"value":302},{"type":62,"tag":184,"props":7825,"children":7826},{"style":197},[7827],{"type":67,"value":307},{"type":62,"tag":184,"props":7829,"children":7830},{"style":259},[7831],{"type":67,"value":312},{"type":62,"tag":184,"props":7833,"children":7834},{"style":197},[7835],{"type":67,"value":200},{"type":62,"tag":184,"props":7837,"children":7838},{"style":197},[7839],{"type":67,"value":7251},{"type":62,"tag":184,"props":7841,"children":7842},{"style":197},[7843],{"type":67,"value":211},{"type":62,"tag":184,"props":7845,"children":7846},{"style":203},[7847],{"type":67,"value":374},{"type":62,"tag":184,"props":7849,"children":7850},{"class":186,"line":2559},[7851],{"type":62,"tag":184,"props":7852,"children":7853},{"emptyLinePlaceholder":239},[7854],{"type":67,"value":242},{"type":62,"tag":184,"props":7856,"children":7857},{"class":186,"line":2579},[7858,7862,7866,7870,7874,7878,7882,7886,7891,7895,7899],{"type":62,"tag":184,"props":7859,"children":7860},{"style":191},[7861],{"type":67,"value":803},{"type":62,"tag":184,"props":7863,"children":7864},{"style":259},[7865],{"type":67,"value":808},{"type":62,"tag":184,"props":7867,"children":7868},{"style":203},[7869],{"type":67,"value":105},{"type":62,"tag":184,"props":7871,"children":7872},{"style":197},[7873],{"type":67,"value":272},{"type":62,"tag":184,"props":7875,"children":7876},{"style":275},[7877],{"type":67,"value":552},{"type":62,"tag":184,"props":7879,"children":7880},{"style":203},[7881],{"type":67,"value":297},{"type":62,"tag":184,"props":7883,"children":7884},{"style":197},[7885],{"type":67,"value":355},{"type":62,"tag":184,"props":7887,"children":7888},{"style":224},[7889],{"type":67,"value":7890},"\u002Fusers\u002F$id",{"type":62,"tag":184,"props":7892,"children":7893},{"style":197},[7894],{"type":67,"value":355},{"type":62,"tag":184,"props":7896,"children":7897},{"style":203},[7898],{"type":67,"value":842},{"type":62,"tag":184,"props":7900,"children":7901},{"style":197},[7902],{"type":67,"value":847},{"type":62,"tag":184,"props":7904,"children":7905},{"class":186,"line":2605},[7906,7910,7914,7918,7923,7927,7931,7935,7939,7943,7947,7951,7955,7959,7963,7967,7971,7976,7980,7984,7988],{"type":62,"tag":184,"props":7907,"children":7908},{"style":275},[7909],{"type":67,"value":855},{"type":62,"tag":184,"props":7911,"children":7912},{"style":197},[7913],{"type":67,"value":341},{"type":62,"tag":184,"props":7915,"children":7916},{"style":197},[7917],{"type":67,"value":1394},{"type":62,"tag":184,"props":7919,"children":7920},{"style":1052},[7921],{"type":67,"value":7922}," params",{"type":62,"tag":184,"props":7924,"children":7925},{"style":197},[7926],{"type":67,"value":1361},{"type":62,"tag":184,"props":7928,"children":7929},{"style":259},[7930],{"type":67,"value":312},{"type":62,"tag":184,"props":7932,"children":7933},{"style":275},[7934],{"type":67,"value":7238},{"type":62,"tag":184,"props":7936,"children":7937},{"style":203},[7938],{"type":67,"value":297},{"type":62,"tag":184,"props":7940,"children":7941},{"style":197},[7942],{"type":67,"value":421},{"type":62,"tag":184,"props":7944,"children":7945},{"style":333},[7946],{"type":67,"value":1399},{"type":62,"tag":184,"props":7948,"children":7949},{"style":197},[7950],{"type":67,"value":341},{"type":62,"tag":184,"props":7952,"children":7953},{"style":197},[7954],{"type":67,"value":200},{"type":62,"tag":184,"props":7956,"children":7957},{"style":333},[7958],{"type":67,"value":1346},{"type":62,"tag":184,"props":7960,"children":7961},{"style":197},[7962],{"type":67,"value":341},{"type":62,"tag":184,"props":7964,"children":7965},{"style":203},[7966],{"type":67,"value":7922},{"type":62,"tag":184,"props":7968,"children":7969},{"style":197},[7970],{"type":67,"value":287},{"type":62,"tag":184,"props":7972,"children":7973},{"style":203},[7974],{"type":67,"value":7975},"id ",{"type":62,"tag":184,"props":7977,"children":7978},{"style":197},[7979],{"type":67,"value":369},{"type":62,"tag":184,"props":7981,"children":7982},{"style":197},[7983],{"type":67,"value":211},{"type":62,"tag":184,"props":7985,"children":7986},{"style":203},[7987],{"type":67,"value":452},{"type":62,"tag":184,"props":7989,"children":7990},{"style":197},[7991],{"type":67,"value":881},{"type":62,"tag":184,"props":7993,"children":7994},{"class":186,"line":2639},[7995,7999,8003,8008],{"type":62,"tag":184,"props":7996,"children":7997},{"style":333},[7998],{"type":67,"value":889},{"type":62,"tag":184,"props":8000,"children":8001},{"style":197},[8002],{"type":67,"value":341},{"type":62,"tag":184,"props":8004,"children":8005},{"style":203},[8006],{"type":67,"value":8007}," UserPage",{"type":62,"tag":184,"props":8009,"children":8010},{"style":197},[8011],{"type":67,"value":881},{"type":62,"tag":184,"props":8013,"children":8014},{"class":186,"line":2647},[8015,8019],{"type":62,"tag":184,"props":8016,"children":8017},{"style":197},[8018],{"type":67,"value":369},{"type":62,"tag":184,"props":8020,"children":8021},{"style":203},[8022],{"type":67,"value":374},{"type":62,"tag":70,"props":8024,"children":8025},{},[8026,8028,8033,8034,8039,8041,8046],{"type":67,"value":8027},"If you see ",{"type":62,"tag":76,"props":8029,"children":8031},{"className":8030},[],[8032],{"type":67,"value":7133},{"type":67,"value":7135},{"type":62,"tag":76,"props":8035,"children":8037},{"className":8036},[],[8038],{"type":67,"value":7141},{"type":67,"value":8040},", or ",{"type":62,"tag":76,"props":8042,"children":8044},{"className":8043},[],[8045],{"type":67,"value":7156},{"type":67,"value":8047}," in agent output, the agent is generating for the wrong framework. Build will fail or routes will conflict at runtime.",{"type":62,"tag":2840,"props":8049,"children":8051},{"id":8050},"_4-high-dynamic-imports-for-server-functions",[8052],{"type":67,"value":8053},"4. HIGH: Dynamic imports for server functions",{"type":62,"tag":173,"props":8055,"children":8057},{"className":175,"code":8056,"language":177,"meta":178,"style":178},"\u002F\u002F WRONG — can cause bundler issues\nconst { getUser } = await import('~\u002Futils\u002Fusers.functions')\n\n\u002F\u002F CORRECT — static imports are safe, build handles environment shaking\nimport { getUser } from '~\u002Futils\u002Fusers.functions'\n",[8058],{"type":62,"tag":76,"props":8059,"children":8060},{"__ignoreMap":178},[8061,8069,8122,8129,8137],{"type":62,"tag":184,"props":8062,"children":8063},{"class":186,"line":187},[8064],{"type":62,"tag":184,"props":8065,"children":8066},{"style":249},[8067],{"type":67,"value":8068},"\u002F\u002F WRONG — can cause bundler issues\n",{"type":62,"tag":184,"props":8070,"children":8071},{"class":186,"line":235},[8072,8076,8080,8084,8088,8092,8096,8101,8105,8109,8114,8118],{"type":62,"tag":184,"props":8073,"children":8074},{"style":259},[8075],{"type":67,"value":262},{"type":62,"tag":184,"props":8077,"children":8078},{"style":197},[8079],{"type":67,"value":200},{"type":62,"tag":184,"props":8081,"children":8082},{"style":203},[8083],{"type":67,"value":5794},{"type":62,"tag":184,"props":8085,"children":8086},{"style":197},[8087],{"type":67,"value":369},{"type":62,"tag":184,"props":8089,"children":8090},{"style":197},[8091],{"type":67,"value":718},{"type":62,"tag":184,"props":8093,"children":8094},{"style":191},[8095],{"type":67,"value":723},{"type":62,"tag":184,"props":8097,"children":8098},{"style":197},[8099],{"type":67,"value":8100}," import",{"type":62,"tag":184,"props":8102,"children":8103},{"style":203},[8104],{"type":67,"value":297},{"type":62,"tag":184,"props":8106,"children":8107},{"style":197},[8108],{"type":67,"value":355},{"type":62,"tag":184,"props":8110,"children":8111},{"style":224},[8112],{"type":67,"value":8113},"~\u002Futils\u002Fusers.functions",{"type":62,"tag":184,"props":8115,"children":8116},{"style":197},[8117],{"type":67,"value":355},{"type":62,"tag":184,"props":8119,"children":8120},{"style":203},[8121],{"type":67,"value":374},{"type":62,"tag":184,"props":8123,"children":8124},{"class":186,"line":245},[8125],{"type":62,"tag":184,"props":8126,"children":8127},{"emptyLinePlaceholder":239},[8128],{"type":67,"value":242},{"type":62,"tag":184,"props":8130,"children":8131},{"class":186,"line":255},[8132],{"type":62,"tag":184,"props":8133,"children":8134},{"style":249},[8135],{"type":67,"value":8136},"\u002F\u002F CORRECT — static imports are safe, build handles environment shaking\n",{"type":62,"tag":184,"props":8138,"children":8139},{"class":186,"line":320},[8140,8144,8148,8152,8156,8160,8164,8168],{"type":62,"tag":184,"props":8141,"children":8142},{"style":191},[8143],{"type":67,"value":194},{"type":62,"tag":184,"props":8145,"children":8146},{"style":197},[8147],{"type":67,"value":200},{"type":62,"tag":184,"props":8149,"children":8150},{"style":203},[8151],{"type":67,"value":7238},{"type":62,"tag":184,"props":8153,"children":8154},{"style":197},[8155],{"type":67,"value":211},{"type":62,"tag":184,"props":8157,"children":8158},{"style":191},[8159],{"type":67,"value":216},{"type":62,"tag":184,"props":8161,"children":8162},{"style":197},[8163],{"type":67,"value":221},{"type":62,"tag":184,"props":8165,"children":8166},{"style":224},[8167],{"type":67,"value":8113},{"type":62,"tag":184,"props":8169,"children":8170},{"style":197},[8171],{"type":67,"value":232},{"type":62,"tag":2840,"props":8173,"children":8175},{"id":8174},"_5-high-awaiting-server-function-without-calling-it",[8176],{"type":67,"value":8177},"5. HIGH: Awaiting server function without calling it",{"type":62,"tag":70,"props":8179,"children":8180},{},[8181,8186,8188,8193],{"type":62,"tag":76,"props":8182,"children":8184},{"className":8183},[],[8185],{"type":67,"value":81},{"type":67,"value":8187}," returns a function — it must be invoked with ",{"type":62,"tag":76,"props":8189,"children":8191},{"className":8190},[],[8192],{"type":67,"value":282},{"type":67,"value":341},{"type":62,"tag":173,"props":8195,"children":8197},{"className":175,"code":8196,"language":177,"meta":178,"style":178},"\u002F\u002F WRONG — getItems is a function, not a Promise\nconst data = await getItems\n\n\u002F\u002F CORRECT — call the function\nconst data = await getItems()\n\n\u002F\u002F With validated input\nconst data = await getItems({ data: { id: '1' } })\n",[8198],{"type":62,"tag":76,"props":8199,"children":8200},{"__ignoreMap":178},[8201,8209,8234,8241,8249,8277,8284,8292],{"type":62,"tag":184,"props":8202,"children":8203},{"class":186,"line":187},[8204],{"type":62,"tag":184,"props":8205,"children":8206},{"style":249},[8207],{"type":67,"value":8208},"\u002F\u002F WRONG — getItems is a function, not a Promise\n",{"type":62,"tag":184,"props":8210,"children":8211},{"class":186,"line":235},[8212,8216,8221,8225,8229],{"type":62,"tag":184,"props":8213,"children":8214},{"style":259},[8215],{"type":67,"value":262},{"type":62,"tag":184,"props":8217,"children":8218},{"style":203},[8219],{"type":67,"value":8220}," data ",{"type":62,"tag":184,"props":8222,"children":8223},{"style":197},[8224],{"type":67,"value":272},{"type":62,"tag":184,"props":8226,"children":8227},{"style":191},[8228],{"type":67,"value":723},{"type":62,"tag":184,"props":8230,"children":8231},{"style":203},[8232],{"type":67,"value":8233}," getItems\n",{"type":62,"tag":184,"props":8235,"children":8236},{"class":186,"line":245},[8237],{"type":62,"tag":184,"props":8238,"children":8239},{"emptyLinePlaceholder":239},[8240],{"type":67,"value":242},{"type":62,"tag":184,"props":8242,"children":8243},{"class":186,"line":255},[8244],{"type":62,"tag":184,"props":8245,"children":8246},{"style":249},[8247],{"type":67,"value":8248},"\u002F\u002F CORRECT — call the function\n",{"type":62,"tag":184,"props":8250,"children":8251},{"class":186,"line":320},[8252,8256,8260,8264,8268,8273],{"type":62,"tag":184,"props":8253,"children":8254},{"style":259},[8255],{"type":67,"value":262},{"type":62,"tag":184,"props":8257,"children":8258},{"style":203},[8259],{"type":67,"value":8220},{"type":62,"tag":184,"props":8261,"children":8262},{"style":197},[8263],{"type":67,"value":272},{"type":62,"tag":184,"props":8265,"children":8266},{"style":191},[8267],{"type":67,"value":723},{"type":62,"tag":184,"props":8269,"children":8270},{"style":275},[8271],{"type":67,"value":8272}," getItems",{"type":62,"tag":184,"props":8274,"children":8275},{"style":203},[8276],{"type":67,"value":986},{"type":62,"tag":184,"props":8278,"children":8279},{"class":186,"line":363},[8280],{"type":62,"tag":184,"props":8281,"children":8282},{"emptyLinePlaceholder":239},[8283],{"type":67,"value":242},{"type":62,"tag":184,"props":8285,"children":8286},{"class":186,"line":377},[8287],{"type":62,"tag":184,"props":8288,"children":8289},{"style":249},[8290],{"type":67,"value":8291},"\u002F\u002F With validated input\n",{"type":62,"tag":184,"props":8293,"children":8294},{"class":186,"line":385},[8295,8299,8303,8307,8311,8315,8319,8323,8327,8331,8335,8339,8343,8347,8351,8355,8359,8363],{"type":62,"tag":184,"props":8296,"children":8297},{"style":259},[8298],{"type":67,"value":262},{"type":62,"tag":184,"props":8300,"children":8301},{"style":203},[8302],{"type":67,"value":8220},{"type":62,"tag":184,"props":8304,"children":8305},{"style":197},[8306],{"type":67,"value":272},{"type":62,"tag":184,"props":8308,"children":8309},{"style":191},[8310],{"type":67,"value":723},{"type":62,"tag":184,"props":8312,"children":8313},{"style":275},[8314],{"type":67,"value":8272},{"type":62,"tag":184,"props":8316,"children":8317},{"style":203},[8318],{"type":67,"value":297},{"type":62,"tag":184,"props":8320,"children":8321},{"style":197},[8322],{"type":67,"value":421},{"type":62,"tag":184,"props":8324,"children":8325},{"style":333},[8326],{"type":67,"value":1399},{"type":62,"tag":184,"props":8328,"children":8329},{"style":197},[8330],{"type":67,"value":341},{"type":62,"tag":184,"props":8332,"children":8333},{"style":197},[8334],{"type":67,"value":200},{"type":62,"tag":184,"props":8336,"children":8337},{"style":333},[8338],{"type":67,"value":1346},{"type":62,"tag":184,"props":8340,"children":8341},{"style":197},[8342],{"type":67,"value":341},{"type":62,"tag":184,"props":8344,"children":8345},{"style":197},[8346],{"type":67,"value":221},{"type":62,"tag":184,"props":8348,"children":8349},{"style":224},[8350],{"type":67,"value":3335},{"type":62,"tag":184,"props":8352,"children":8353},{"style":197},[8354],{"type":67,"value":355},{"type":62,"tag":184,"props":8356,"children":8357},{"style":197},[8358],{"type":67,"value":211},{"type":62,"tag":184,"props":8360,"children":8361},{"style":197},[8362],{"type":67,"value":211},{"type":62,"tag":184,"props":8364,"children":8365},{"style":203},[8366],{"type":67,"value":374},{"type":62,"tag":2840,"props":8368,"children":8370},{"id":8369},"_6-critical-caching-authenticated-responses-with-cache-control-public",[8371,8373],{"type":67,"value":8372},"6. CRITICAL: Caching authenticated responses with ",{"type":62,"tag":76,"props":8374,"children":8376},{"className":8375},[],[8377],{"type":67,"value":8378},"Cache-Control: public",{"type":62,"tag":70,"props":8380,"children":8381},{},[8382,8388],{"type":62,"tag":76,"props":8383,"children":8385},{"className":8384},[],[8386],{"type":67,"value":8387},"Cache-Control: public, max-age=N",{"type":67,"value":8389}," tells every CDN, proxy, and shared cache between you and the user that this response can be served to anyone. If the response depends on the session (user, tenant, role), the first user's response gets cached and replayed to the next user — a cross-tenant data leak.",{"type":62,"tag":173,"props":8391,"children":8393},{"className":175,"code":8392,"language":177,"meta":178,"style":178},"\u002F\u002F WRONG — auth'd response, public cache, leaks to next user via CDN\nconst getMyOrders = createServerFn({ method: 'GET' }).handler(async () => {\n  const session = await requireSession() \u002F\u002F identity-dependent\n  setResponseHeaders({ 'Cache-Control': 'public, max-age=300' })\n  return db.orders.findMany({ where: { userId: session.userId } })\n})\n\n\u002F\u002F CORRECT — private + Vary so any cache that does store it keys by identity\nconst getMyOrders = createServerFn({ method: 'GET' }).handler(async () => {\n  const session = await requireSession()\n  setResponseHeaders({\n    'Cache-Control': 'private, max-age=60',\n    Vary: 'Cookie, Authorization',\n  })\n  return db.orders.findMany({ where: { userId: session.userId } })\n})\n\n\u002F\u002F ALSO CORRECT — opt out entirely for sensitive data\nsetResponseHeaders({ 'Cache-Control': 'no-store' })\n",[8394],{"type":62,"tag":76,"props":8395,"children":8396},{"__ignoreMap":178},[8397,8405,8488,8522,8573,8652,8663,8670,8678,8761,8788,8803,8838,8865,8876,8955,8966,8973,8981],{"type":62,"tag":184,"props":8398,"children":8399},{"class":186,"line":187},[8400],{"type":62,"tag":184,"props":8401,"children":8402},{"style":249},[8403],{"type":67,"value":8404},"\u002F\u002F WRONG — auth'd response, public cache, leaks to next user via CDN\n",{"type":62,"tag":184,"props":8406,"children":8407},{"class":186,"line":235},[8408,8412,8416,8420,8424,8428,8432,8436,8440,8444,8448,8452,8456,8460,8464,8468,8472,8476,8480,8484],{"type":62,"tag":184,"props":8409,"children":8410},{"style":259},[8411],{"type":67,"value":262},{"type":62,"tag":184,"props":8413,"children":8414},{"style":203},[8415],{"type":67,"value":6051},{"type":62,"tag":184,"props":8417,"children":8418},{"style":197},[8419],{"type":67,"value":272},{"type":62,"tag":184,"props":8421,"children":8422},{"style":275},[8423],{"type":67,"value":206},{"type":62,"tag":184,"props":8425,"children":8426},{"style":203},[8427],{"type":67,"value":297},{"type":62,"tag":184,"props":8429,"children":8430},{"style":197},[8431],{"type":67,"value":421},{"type":62,"tag":184,"props":8433,"children":8434},{"style":333},[8435],{"type":67,"value":426},{"type":62,"tag":184,"props":8437,"children":8438},{"style":197},[8439],{"type":67,"value":341},{"type":62,"tag":184,"props":8441,"children":8442},{"style":197},[8443],{"type":67,"value":221},{"type":62,"tag":184,"props":8445,"children":8446},{"style":224},[8447],{"type":67,"value":660},{"type":62,"tag":184,"props":8449,"children":8450},{"style":197},[8451],{"type":67,"value":355},{"type":62,"tag":184,"props":8453,"children":8454},{"style":197},[8455],{"type":67,"value":211},{"type":62,"tag":184,"props":8457,"children":8458},{"style":203},[8459],{"type":67,"value":452},{"type":62,"tag":184,"props":8461,"children":8462},{"style":197},[8463],{"type":67,"value":287},{"type":62,"tag":184,"props":8465,"children":8466},{"style":275},[8467],{"type":67,"value":292},{"type":62,"tag":184,"props":8469,"children":8470},{"style":203},[8471],{"type":67,"value":297},{"type":62,"tag":184,"props":8473,"children":8474},{"style":259},[8475],{"type":67,"value":302},{"type":62,"tag":184,"props":8477,"children":8478},{"style":197},[8479],{"type":67,"value":307},{"type":62,"tag":184,"props":8481,"children":8482},{"style":259},[8483],{"type":67,"value":312},{"type":62,"tag":184,"props":8485,"children":8486},{"style":197},[8487],{"type":67,"value":317},{"type":62,"tag":184,"props":8489,"children":8490},{"class":186,"line":245},[8491,8495,8500,8504,8508,8513,8517],{"type":62,"tag":184,"props":8492,"children":8493},{"style":259},[8494],{"type":67,"value":708},{"type":62,"tag":184,"props":8496,"children":8497},{"style":203},[8498],{"type":67,"value":8499}," session",{"type":62,"tag":184,"props":8501,"children":8502},{"style":197},[8503],{"type":67,"value":718},{"type":62,"tag":184,"props":8505,"children":8506},{"style":191},[8507],{"type":67,"value":723},{"type":62,"tag":184,"props":8509,"children":8510},{"style":275},[8511],{"type":67,"value":8512}," requireSession",{"type":62,"tag":184,"props":8514,"children":8515},{"style":333},[8516],{"type":67,"value":2315},{"type":62,"tag":184,"props":8518,"children":8519},{"style":249},[8520],{"type":67,"value":8521},"\u002F\u002F identity-dependent\n",{"type":62,"tag":184,"props":8523,"children":8524},{"class":186,"line":255},[8525,8529,8533,8537,8541,8545,8549,8553,8557,8561,8565,8569],{"type":62,"tag":184,"props":8526,"children":8527},{"style":275},[8528],{"type":67,"value":4844},{"type":62,"tag":184,"props":8530,"children":8531},{"style":333},[8532],{"type":67,"value":297},{"type":62,"tag":184,"props":8534,"children":8535},{"style":197},[8536],{"type":67,"value":421},{"type":62,"tag":184,"props":8538,"children":8539},{"style":197},[8540],{"type":67,"value":221},{"type":62,"tag":184,"props":8542,"children":8543},{"style":333},[8544],{"type":67,"value":5027},{"type":62,"tag":184,"props":8546,"children":8547},{"style":197},[8548],{"type":67,"value":355},{"type":62,"tag":184,"props":8550,"children":8551},{"style":197},[8552],{"type":67,"value":341},{"type":62,"tag":184,"props":8554,"children":8555},{"style":197},[8556],{"type":67,"value":221},{"type":62,"tag":184,"props":8558,"children":8559},{"style":224},[8560],{"type":67,"value":5044},{"type":62,"tag":184,"props":8562,"children":8563},{"style":197},[8564],{"type":67,"value":355},{"type":62,"tag":184,"props":8566,"children":8567},{"style":197},[8568],{"type":67,"value":211},{"type":62,"tag":184,"props":8570,"children":8571},{"style":333},[8572],{"type":67,"value":374},{"type":62,"tag":184,"props":8574,"children":8575},{"class":186,"line":320},[8576,8580,8584,8588,8592,8596,8600,8604,8608,8612,8616,8620,8624,8628,8632,8636,8640,8644,8648],{"type":62,"tag":184,"props":8577,"children":8578},{"style":191},[8579],{"type":67,"value":326},{"type":62,"tag":184,"props":8581,"children":8582},{"style":203},[8583],{"type":67,"value":728},{"type":62,"tag":184,"props":8585,"children":8586},{"style":197},[8587],{"type":67,"value":287},{"type":62,"tag":184,"props":8589,"children":8590},{"style":203},[8591],{"type":67,"value":6143},{"type":62,"tag":184,"props":8593,"children":8594},{"style":197},[8595],{"type":67,"value":287},{"type":62,"tag":184,"props":8597,"children":8598},{"style":275},[8599],{"type":67,"value":1890},{"type":62,"tag":184,"props":8601,"children":8602},{"style":333},[8603],{"type":67,"value":297},{"type":62,"tag":184,"props":8605,"children":8606},{"style":197},[8607],{"type":67,"value":421},{"type":62,"tag":184,"props":8609,"children":8610},{"style":333},[8611],{"type":67,"value":5632},{"type":62,"tag":184,"props":8613,"children":8614},{"style":197},[8615],{"type":67,"value":341},{"type":62,"tag":184,"props":8617,"children":8618},{"style":197},[8619],{"type":67,"value":200},{"type":62,"tag":184,"props":8621,"children":8622},{"style":333},[8623],{"type":67,"value":6568},{"type":62,"tag":184,"props":8625,"children":8626},{"style":197},[8627],{"type":67,"value":341},{"type":62,"tag":184,"props":8629,"children":8630},{"style":203},[8631],{"type":67,"value":8499},{"type":62,"tag":184,"props":8633,"children":8634},{"style":197},[8635],{"type":67,"value":287},{"type":62,"tag":184,"props":8637,"children":8638},{"style":203},[8639],{"type":67,"value":6594},{"type":62,"tag":184,"props":8641,"children":8642},{"style":197},[8643],{"type":67,"value":211},{"type":62,"tag":184,"props":8645,"children":8646},{"style":197},[8647],{"type":67,"value":211},{"type":62,"tag":184,"props":8649,"children":8650},{"style":333},[8651],{"type":67,"value":374},{"type":62,"tag":184,"props":8653,"children":8654},{"class":186,"line":363},[8655,8659],{"type":62,"tag":184,"props":8656,"children":8657},{"style":197},[8658],{"type":67,"value":369},{"type":62,"tag":184,"props":8660,"children":8661},{"style":203},[8662],{"type":67,"value":374},{"type":62,"tag":184,"props":8664,"children":8665},{"class":186,"line":377},[8666],{"type":62,"tag":184,"props":8667,"children":8668},{"emptyLinePlaceholder":239},[8669],{"type":67,"value":242},{"type":62,"tag":184,"props":8671,"children":8672},{"class":186,"line":385},[8673],{"type":62,"tag":184,"props":8674,"children":8675},{"style":249},[8676],{"type":67,"value":8677},"\u002F\u002F CORRECT — private + Vary so any cache that does store it keys by identity\n",{"type":62,"tag":184,"props":8679,"children":8680},{"class":186,"line":394},[8681,8685,8689,8693,8697,8701,8705,8709,8713,8717,8721,8725,8729,8733,8737,8741,8745,8749,8753,8757],{"type":62,"tag":184,"props":8682,"children":8683},{"style":259},[8684],{"type":67,"value":262},{"type":62,"tag":184,"props":8686,"children":8687},{"style":203},[8688],{"type":67,"value":6051},{"type":62,"tag":184,"props":8690,"children":8691},{"style":197},[8692],{"type":67,"value":272},{"type":62,"tag":184,"props":8694,"children":8695},{"style":275},[8696],{"type":67,"value":206},{"type":62,"tag":184,"props":8698,"children":8699},{"style":203},[8700],{"type":67,"value":297},{"type":62,"tag":184,"props":8702,"children":8703},{"style":197},[8704],{"type":67,"value":421},{"type":62,"tag":184,"props":8706,"children":8707},{"style":333},[8708],{"type":67,"value":426},{"type":62,"tag":184,"props":8710,"children":8711},{"style":197},[8712],{"type":67,"value":341},{"type":62,"tag":184,"props":8714,"children":8715},{"style":197},[8716],{"type":67,"value":221},{"type":62,"tag":184,"props":8718,"children":8719},{"style":224},[8720],{"type":67,"value":660},{"type":62,"tag":184,"props":8722,"children":8723},{"style":197},[8724],{"type":67,"value":355},{"type":62,"tag":184,"props":8726,"children":8727},{"style":197},[8728],{"type":67,"value":211},{"type":62,"tag":184,"props":8730,"children":8731},{"style":203},[8732],{"type":67,"value":452},{"type":62,"tag":184,"props":8734,"children":8735},{"style":197},[8736],{"type":67,"value":287},{"type":62,"tag":184,"props":8738,"children":8739},{"style":275},[8740],{"type":67,"value":292},{"type":62,"tag":184,"props":8742,"children":8743},{"style":203},[8744],{"type":67,"value":297},{"type":62,"tag":184,"props":8746,"children":8747},{"style":259},[8748],{"type":67,"value":302},{"type":62,"tag":184,"props":8750,"children":8751},{"style":197},[8752],{"type":67,"value":307},{"type":62,"tag":184,"props":8754,"children":8755},{"style":259},[8756],{"type":67,"value":312},{"type":62,"tag":184,"props":8758,"children":8759},{"style":197},[8760],{"type":67,"value":317},{"type":62,"tag":184,"props":8762,"children":8763},{"class":186,"line":483},[8764,8768,8772,8776,8780,8784],{"type":62,"tag":184,"props":8765,"children":8766},{"style":259},[8767],{"type":67,"value":708},{"type":62,"tag":184,"props":8769,"children":8770},{"style":203},[8771],{"type":67,"value":8499},{"type":62,"tag":184,"props":8773,"children":8774},{"style":197},[8775],{"type":67,"value":718},{"type":62,"tag":184,"props":8777,"children":8778},{"style":191},[8779],{"type":67,"value":723},{"type":62,"tag":184,"props":8781,"children":8782},{"style":275},[8783],{"type":67,"value":8512},{"type":62,"tag":184,"props":8785,"children":8786},{"style":333},[8787],{"type":67,"value":986},{"type":62,"tag":184,"props":8789,"children":8790},{"class":186,"line":514},[8791,8795,8799],{"type":62,"tag":184,"props":8792,"children":8793},{"style":275},[8794],{"type":67,"value":4844},{"type":62,"tag":184,"props":8796,"children":8797},{"style":333},[8798],{"type":67,"value":297},{"type":62,"tag":184,"props":8800,"children":8801},{"style":197},[8802],{"type":67,"value":847},{"type":62,"tag":184,"props":8804,"children":8805},{"class":186,"line":905},[8806,8810,8814,8818,8822,8826,8830,8834],{"type":62,"tag":184,"props":8807,"children":8808},{"style":197},[8809],{"type":67,"value":5022},{"type":62,"tag":184,"props":8811,"children":8812},{"style":333},[8813],{"type":67,"value":5027},{"type":62,"tag":184,"props":8815,"children":8816},{"style":197},[8817],{"type":67,"value":355},{"type":62,"tag":184,"props":8819,"children":8820},{"style":197},[8821],{"type":67,"value":341},{"type":62,"tag":184,"props":8823,"children":8824},{"style":197},[8825],{"type":67,"value":221},{"type":62,"tag":184,"props":8827,"children":8828},{"style":224},[8829],{"type":67,"value":5325},{"type":62,"tag":184,"props":8831,"children":8832},{"style":197},[8833],{"type":67,"value":355},{"type":62,"tag":184,"props":8835,"children":8836},{"style":197},[8837],{"type":67,"value":881},{"type":62,"tag":184,"props":8839,"children":8840},{"class":186,"line":917},[8841,8845,8849,8853,8857,8861],{"type":62,"tag":184,"props":8842,"children":8843},{"style":333},[8844],{"type":67,"value":5341},{"type":62,"tag":184,"props":8846,"children":8847},{"style":197},[8848],{"type":67,"value":341},{"type":62,"tag":184,"props":8850,"children":8851},{"style":197},[8852],{"type":67,"value":221},{"type":62,"tag":184,"props":8854,"children":8855},{"style":224},[8856],{"type":67,"value":5354},{"type":62,"tag":184,"props":8858,"children":8859},{"style":197},[8860],{"type":67,"value":355},{"type":62,"tag":184,"props":8862,"children":8863},{"style":197},[8864],{"type":67,"value":881},{"type":62,"tag":184,"props":8866,"children":8867},{"class":186,"line":925},[8868,8872],{"type":62,"tag":184,"props":8869,"children":8870},{"style":197},[8871],{"type":67,"value":1533},{"type":62,"tag":184,"props":8873,"children":8874},{"style":333},[8875],{"type":67,"value":374},{"type":62,"tag":184,"props":8877,"children":8878},{"class":186,"line":946},[8879,8883,8887,8891,8895,8899,8903,8907,8911,8915,8919,8923,8927,8931,8935,8939,8943,8947,8951],{"type":62,"tag":184,"props":8880,"children":8881},{"style":191},[8882],{"type":67,"value":326},{"type":62,"tag":184,"props":8884,"children":8885},{"style":203},[8886],{"type":67,"value":728},{"type":62,"tag":184,"props":8888,"children":8889},{"style":197},[8890],{"type":67,"value":287},{"type":62,"tag":184,"props":8892,"children":8893},{"style":203},[8894],{"type":67,"value":6143},{"type":62,"tag":184,"props":8896,"children":8897},{"style":197},[8898],{"type":67,"value":287},{"type":62,"tag":184,"props":8900,"children":8901},{"style":275},[8902],{"type":67,"value":1890},{"type":62,"tag":184,"props":8904,"children":8905},{"style":333},[8906],{"type":67,"value":297},{"type":62,"tag":184,"props":8908,"children":8909},{"style":197},[8910],{"type":67,"value":421},{"type":62,"tag":184,"props":8912,"children":8913},{"style":333},[8914],{"type":67,"value":5632},{"type":62,"tag":184,"props":8916,"children":8917},{"style":197},[8918],{"type":67,"value":341},{"type":62,"tag":184,"props":8920,"children":8921},{"style":197},[8922],{"type":67,"value":200},{"type":62,"tag":184,"props":8924,"children":8925},{"style":333},[8926],{"type":67,"value":6568},{"type":62,"tag":184,"props":8928,"children":8929},{"style":197},[8930],{"type":67,"value":341},{"type":62,"tag":184,"props":8932,"children":8933},{"style":203},[8934],{"type":67,"value":8499},{"type":62,"tag":184,"props":8936,"children":8937},{"style":197},[8938],{"type":67,"value":287},{"type":62,"tag":184,"props":8940,"children":8941},{"style":203},[8942],{"type":67,"value":6594},{"type":62,"tag":184,"props":8944,"children":8945},{"style":197},[8946],{"type":67,"value":211},{"type":62,"tag":184,"props":8948,"children":8949},{"style":197},[8950],{"type":67,"value":211},{"type":62,"tag":184,"props":8952,"children":8953},{"style":333},[8954],{"type":67,"value":374},{"type":62,"tag":184,"props":8956,"children":8957},{"class":186,"line":989},[8958,8962],{"type":62,"tag":184,"props":8959,"children":8960},{"style":197},[8961],{"type":67,"value":369},{"type":62,"tag":184,"props":8963,"children":8964},{"style":203},[8965],{"type":67,"value":374},{"type":62,"tag":184,"props":8967,"children":8968},{"class":186,"line":1002},[8969],{"type":62,"tag":184,"props":8970,"children":8971},{"emptyLinePlaceholder":239},[8972],{"type":67,"value":242},{"type":62,"tag":184,"props":8974,"children":8975},{"class":186,"line":1021},[8976],{"type":62,"tag":184,"props":8977,"children":8978},{"style":249},[8979],{"type":67,"value":8980},"\u002F\u002F ALSO CORRECT — opt out entirely for sensitive data\n",{"type":62,"tag":184,"props":8982,"children":8983},{"class":186,"line":1069},[8984,8989,8993,8997,9001,9005,9009,9013,9017,9022,9026,9030],{"type":62,"tag":184,"props":8985,"children":8986},{"style":275},[8987],{"type":67,"value":8988},"setResponseHeaders",{"type":62,"tag":184,"props":8990,"children":8991},{"style":203},[8992],{"type":67,"value":297},{"type":62,"tag":184,"props":8994,"children":8995},{"style":197},[8996],{"type":67,"value":421},{"type":62,"tag":184,"props":8998,"children":8999},{"style":197},[9000],{"type":67,"value":221},{"type":62,"tag":184,"props":9002,"children":9003},{"style":333},[9004],{"type":67,"value":5027},{"type":62,"tag":184,"props":9006,"children":9007},{"style":197},[9008],{"type":67,"value":355},{"type":62,"tag":184,"props":9010,"children":9011},{"style":197},[9012],{"type":67,"value":341},{"type":62,"tag":184,"props":9014,"children":9015},{"style":197},[9016],{"type":67,"value":221},{"type":62,"tag":184,"props":9018,"children":9019},{"style":224},[9020],{"type":67,"value":9021},"no-store",{"type":62,"tag":184,"props":9023,"children":9024},{"style":197},[9025],{"type":67,"value":355},{"type":62,"tag":184,"props":9027,"children":9028},{"style":197},[9029],{"type":67,"value":211},{"type":62,"tag":184,"props":9031,"children":9032},{"style":203},[9033],{"type":67,"value":374},{"type":62,"tag":70,"props":9035,"children":9036},{},[9037,9039,9044,9045,9051,9053,9059,9061,9066,9068,9073,9075,9081],{"type":67,"value":9038},"Rule of thumb: if the handler reads a session\u002Fcookie\u002Fauth header or branches on identity, the response is ",{"type":62,"tag":92,"props":9040,"children":9041},{},[9042],{"type":67,"value":9043},"not",{"type":67,"value":6637},{"type":62,"tag":76,"props":9046,"children":9048},{"className":9047},[],[9049],{"type":67,"value":9050},"public",{"type":67,"value":9052},". Default to ",{"type":62,"tag":76,"props":9054,"children":9056},{"className":9055},[],[9057],{"type":67,"value":9058},"private",{"type":67,"value":9060}," (or ",{"type":62,"tag":76,"props":9062,"children":9064},{"className":9063},[],[9065],{"type":67,"value":9021},{"type":67,"value":9067}," for sensitive data); reach for ",{"type":62,"tag":76,"props":9069,"children":9071},{"className":9070},[],[9072],{"type":67,"value":9050},{"type":67,"value":9074}," only on responses that are byte-for-byte identical regardless of who asks. See also ",{"type":62,"tag":115,"props":9076,"children":9078},{"href":9077},"..\u002Fdeployment\u002FSKILL.md",[9079],{"type":67,"value":9080},"start-core\u002Fdeployment",{"type":67,"value":9082}," for ISR\u002FCache-Control on full pages.",{"type":62,"tag":2840,"props":9084,"children":9086},{"id":9085},"_7-medium-when-to-wrap-with-useserverfn",[9087,9089],{"type":67,"value":9088},"7. MEDIUM: When to wrap with ",{"type":62,"tag":76,"props":9090,"children":9092},{"className":9091},[],[9093],{"type":67,"value":1199},{"type":62,"tag":70,"props":9095,"children":9096},{},[9097,9102,9104,9109,9111,9117,9118,9124,9126,9132,9134,9140],{"type":62,"tag":76,"props":9098,"children":9100},{"className":9099},[],[9101],{"type":67,"value":1199},{"type":67,"value":9103}," is ",{"type":62,"tag":92,"props":9105,"children":9106},{},[9107],{"type":67,"value":9108},"required",{"type":67,"value":9110}," when the server function uses ",{"type":62,"tag":76,"props":9112,"children":9114},{"className":9113},[],[9115],{"type":67,"value":9116},"throw redirect()",{"type":67,"value":7158},{"type":62,"tag":76,"props":9119,"children":9121},{"className":9120},[],[9122],{"type":67,"value":9123},"throw notFound()",{"type":67,"value":9125}," — the hook wires the throw into the router so the redirect actually navigates. For server functions that just return data (call them directly or via ",{"type":62,"tag":76,"props":9127,"children":9129},{"className":9128},[],[9130],{"type":67,"value":9131},"useMutation",{"type":67,"value":9133},"\u002F",{"type":62,"tag":76,"props":9135,"children":9137},{"className":9136},[],[9138],{"type":67,"value":9139},"useQuery",{"type":67,"value":9141},"), the hook is optional.",{"type":62,"tag":173,"props":9143,"children":9145},{"className":175,"code":9144,"language":177,"meta":178,"style":178},"\u002F\u002F Plain data — direct call is fine (also fine to pass to useMutation\u002FuseQuery)\n\u003Cbutton onClick={() => deletePost({ data: { id } })}>Delete\u003C\u002Fbutton>\nuseMutation({ mutationFn: deletePost })\n\n\u002F\u002F Throws redirect\u002FnotFound — MUST wrap with useServerFn so the router handles the throw\nconst signupFn = useServerFn(signup) \u002F\u002F signup throws redirect on success\n\u003Cbutton onClick={() => signupFn({ data: form })}>Sign up\u003C\u002Fbutton>\n",[9146],{"type":62,"tag":76,"props":9147,"children":9148},{"__ignoreMap":178},[9149,9157,9246,9282,9289,9297,9327],{"type":62,"tag":184,"props":9150,"children":9151},{"class":186,"line":187},[9152],{"type":62,"tag":184,"props":9153,"children":9154},{"style":249},[9155],{"type":67,"value":9156},"\u002F\u002F Plain data — direct call is fine (also fine to pass to useMutation\u002FuseQuery)\n",{"type":62,"tag":184,"props":9158,"children":9159},{"class":186,"line":235},[9160,9165,9169,9173,9177,9181,9186,9190,9194,9198,9202,9206,9211,9215,9219,9223,9228,9233,9238,9242],{"type":62,"tag":184,"props":9161,"children":9162},{"style":197},[9163],{"type":67,"value":9164},"\u003C",{"type":62,"tag":184,"props":9166,"children":9167},{"style":333},[9168],{"type":67,"value":1658},{"type":62,"tag":184,"props":9170,"children":9171},{"style":259},[9172],{"type":67,"value":1663},{"type":62,"tag":184,"props":9174,"children":9175},{"style":197},[9176],{"type":67,"value":1668},{"type":62,"tag":184,"props":9178,"children":9179},{"style":259},[9180],{"type":67,"value":312},{"type":62,"tag":184,"props":9182,"children":9183},{"style":275},[9184],{"type":67,"value":9185}," deletePost",{"type":62,"tag":184,"props":9187,"children":9188},{"style":203},[9189],{"type":67,"value":297},{"type":62,"tag":184,"props":9191,"children":9192},{"style":197},[9193],{"type":67,"value":421},{"type":62,"tag":184,"props":9195,"children":9196},{"style":333},[9197],{"type":67,"value":1399},{"type":62,"tag":184,"props":9199,"children":9200},{"style":197},[9201],{"type":67,"value":341},{"type":62,"tag":184,"props":9203,"children":9204},{"style":197},[9205],{"type":67,"value":200},{"type":62,"tag":184,"props":9207,"children":9208},{"style":203},[9209],{"type":67,"value":9210}," id ",{"type":62,"tag":184,"props":9212,"children":9213},{"style":197},[9214],{"type":67,"value":369},{"type":62,"tag":184,"props":9216,"children":9217},{"style":197},[9218],{"type":67,"value":211},{"type":62,"tag":184,"props":9220,"children":9221},{"style":203},[9222],{"type":67,"value":452},{"type":62,"tag":184,"props":9224,"children":9225},{"style":197},[9226],{"type":67,"value":9227},"}>",{"type":62,"tag":184,"props":9229,"children":9230},{"style":203},[9231],{"type":67,"value":9232},"Delete",{"type":62,"tag":184,"props":9234,"children":9235},{"style":197},[9236],{"type":67,"value":9237},"\u003C\u002F",{"type":62,"tag":184,"props":9239,"children":9240},{"style":333},[9241],{"type":67,"value":1658},{"type":62,"tag":184,"props":9243,"children":9244},{"style":197},[9245],{"type":67,"value":1018},{"type":62,"tag":184,"props":9247,"children":9248},{"class":186,"line":245},[9249,9253,9257,9261,9266,9270,9274,9278],{"type":62,"tag":184,"props":9250,"children":9251},{"style":275},[9252],{"type":67,"value":9131},{"type":62,"tag":184,"props":9254,"children":9255},{"style":203},[9256],{"type":67,"value":297},{"type":62,"tag":184,"props":9258,"children":9259},{"style":197},[9260],{"type":67,"value":421},{"type":62,"tag":184,"props":9262,"children":9263},{"style":333},[9264],{"type":67,"value":9265}," mutationFn",{"type":62,"tag":184,"props":9267,"children":9268},{"style":197},[9269],{"type":67,"value":341},{"type":62,"tag":184,"props":9271,"children":9272},{"style":203},[9273],{"type":67,"value":1263},{"type":62,"tag":184,"props":9275,"children":9276},{"style":197},[9277],{"type":67,"value":369},{"type":62,"tag":184,"props":9279,"children":9280},{"style":203},[9281],{"type":67,"value":374},{"type":62,"tag":184,"props":9283,"children":9284},{"class":186,"line":255},[9285],{"type":62,"tag":184,"props":9286,"children":9287},{"emptyLinePlaceholder":239},[9288],{"type":67,"value":242},{"type":62,"tag":184,"props":9290,"children":9291},{"class":186,"line":320},[9292],{"type":62,"tag":184,"props":9293,"children":9294},{"style":249},[9295],{"type":67,"value":9296},"\u002F\u002F Throws redirect\u002FnotFound — MUST wrap with useServerFn so the router handles the throw\n",{"type":62,"tag":184,"props":9298,"children":9299},{"class":186,"line":363},[9300,9304,9309,9313,9317,9322],{"type":62,"tag":184,"props":9301,"children":9302},{"style":259},[9303],{"type":67,"value":262},{"type":62,"tag":184,"props":9305,"children":9306},{"style":203},[9307],{"type":67,"value":9308}," signupFn ",{"type":62,"tag":184,"props":9310,"children":9311},{"style":197},[9312],{"type":67,"value":272},{"type":62,"tag":184,"props":9314,"children":9315},{"style":275},[9316],{"type":67,"value":1224},{"type":62,"tag":184,"props":9318,"children":9319},{"style":203},[9320],{"type":67,"value":9321},"(signup) ",{"type":62,"tag":184,"props":9323,"children":9324},{"style":249},[9325],{"type":67,"value":9326},"\u002F\u002F signup throws redirect on success\n",{"type":62,"tag":184,"props":9328,"children":9329},{"class":186,"line":377},[9330,9334,9338,9342,9346,9350,9355,9359,9363,9367,9371,9376,9380,9384,9388,9393,9397,9401],{"type":62,"tag":184,"props":9331,"children":9332},{"style":197},[9333],{"type":67,"value":9164},{"type":62,"tag":184,"props":9335,"children":9336},{"style":333},[9337],{"type":67,"value":1658},{"type":62,"tag":184,"props":9339,"children":9340},{"style":259},[9341],{"type":67,"value":1663},{"type":62,"tag":184,"props":9343,"children":9344},{"style":197},[9345],{"type":67,"value":1668},{"type":62,"tag":184,"props":9347,"children":9348},{"style":259},[9349],{"type":67,"value":312},{"type":62,"tag":184,"props":9351,"children":9352},{"style":275},[9353],{"type":67,"value":9354}," signupFn",{"type":62,"tag":184,"props":9356,"children":9357},{"style":203},[9358],{"type":67,"value":297},{"type":62,"tag":184,"props":9360,"children":9361},{"style":197},[9362],{"type":67,"value":421},{"type":62,"tag":184,"props":9364,"children":9365},{"style":333},[9366],{"type":67,"value":1399},{"type":62,"tag":184,"props":9368,"children":9369},{"style":197},[9370],{"type":67,"value":341},{"type":62,"tag":184,"props":9372,"children":9373},{"style":203},[9374],{"type":67,"value":9375}," form ",{"type":62,"tag":184,"props":9377,"children":9378},{"style":197},[9379],{"type":67,"value":369},{"type":62,"tag":184,"props":9381,"children":9382},{"style":203},[9383],{"type":67,"value":452},{"type":62,"tag":184,"props":9385,"children":9386},{"style":197},[9387],{"type":67,"value":9227},{"type":62,"tag":184,"props":9389,"children":9390},{"style":203},[9391],{"type":67,"value":9392},"Sign up",{"type":62,"tag":184,"props":9394,"children":9395},{"style":197},[9396],{"type":67,"value":9237},{"type":62,"tag":184,"props":9398,"children":9399},{"style":333},[9400],{"type":67,"value":1658},{"type":62,"tag":184,"props":9402,"children":9403},{"style":197},[9404],{"type":67,"value":1018},{"type":62,"tag":70,"props":9406,"children":9407},{},[9408,9410,9415],{"type":67,"value":9409},"If in doubt: wrap with ",{"type":62,"tag":76,"props":9411,"children":9413},{"className":9412},[],[9414],{"type":67,"value":1199},{"type":67,"value":9416},". It's a no-op for plain-data functions and the safe default when a function might later add a redirect.",{"type":62,"tag":2840,"props":9418,"children":9420},{"id":9419},"_8-critical-self-fetching-a-relative-api-url-from-a-loader",[9421],{"type":67,"value":9422},"8. CRITICAL: Self-fetching a relative API URL from a loader",{"type":62,"tag":173,"props":9424,"children":9426},{"className":175,"code":9425,"language":177,"meta":178,"style":178},"\u002F\u002F WRONG — this loader also runs during SSR, where a relative URL may fail\nexport const Route = createFileRoute('\u002Fissues')({\n  loader: () => fetch('\u002Fapi\u002Fissues').then((response) => response.json()),\n})\n\n\u002F\u002F CORRECT — call the server function; the client build gets an RPC stub\nexport const Route = createFileRoute('\u002Fissues')({\n  loader: () => listIssues(),\n})\n",[9427],{"type":62,"tag":76,"props":9428,"children":9429},{"__ignoreMap":178},[9430,9438,9485,9580,9591,9598,9606,9653,9684],{"type":62,"tag":184,"props":9431,"children":9432},{"class":186,"line":187},[9433],{"type":62,"tag":184,"props":9434,"children":9435},{"style":249},[9436],{"type":67,"value":9437},"\u002F\u002F WRONG — this loader also runs during SSR, where a relative URL may fail\n",{"type":62,"tag":184,"props":9439,"children":9440},{"class":186,"line":235},[9441,9445,9449,9453,9457,9461,9465,9469,9473,9477,9481],{"type":62,"tag":184,"props":9442,"children":9443},{"style":191},[9444],{"type":67,"value":803},{"type":62,"tag":184,"props":9446,"children":9447},{"style":259},[9448],{"type":67,"value":808},{"type":62,"tag":184,"props":9450,"children":9451},{"style":203},[9452],{"type":67,"value":105},{"type":62,"tag":184,"props":9454,"children":9455},{"style":197},[9456],{"type":67,"value":272},{"type":62,"tag":184,"props":9458,"children":9459},{"style":275},[9460],{"type":67,"value":552},{"type":62,"tag":184,"props":9462,"children":9463},{"style":203},[9464],{"type":67,"value":297},{"type":62,"tag":184,"props":9466,"children":9467},{"style":197},[9468],{"type":67,"value":355},{"type":62,"tag":184,"props":9470,"children":9471},{"style":224},[9472],{"type":67,"value":2471},{"type":62,"tag":184,"props":9474,"children":9475},{"style":197},[9476],{"type":67,"value":355},{"type":62,"tag":184,"props":9478,"children":9479},{"style":203},[9480],{"type":67,"value":842},{"type":62,"tag":184,"props":9482,"children":9483},{"style":197},[9484],{"type":67,"value":847},{"type":62,"tag":184,"props":9486,"children":9487},{"class":186,"line":245},[9488,9492,9496,9500,9504,9508,9512,9516,9521,9525,9529,9533,9537,9541,9545,9550,9554,9558,9563,9567,9571,9576],{"type":62,"tag":184,"props":9489,"children":9490},{"style":275},[9491],{"type":67,"value":855},{"type":62,"tag":184,"props":9493,"children":9494},{"style":197},[9495],{"type":67,"value":341},{"type":62,"tag":184,"props":9497,"children":9498},{"style":197},[9499],{"type":67,"value":307},{"type":62,"tag":184,"props":9501,"children":9502},{"style":259},[9503],{"type":67,"value":312},{"type":62,"tag":184,"props":9505,"children":9506},{"style":275},[9507],{"type":67,"value":7378},{"type":62,"tag":184,"props":9509,"children":9510},{"style":203},[9511],{"type":67,"value":297},{"type":62,"tag":184,"props":9513,"children":9514},{"style":197},[9515],{"type":67,"value":355},{"type":62,"tag":184,"props":9517,"children":9518},{"style":224},[9519],{"type":67,"value":9520},"\u002Fapi\u002Fissues",{"type":62,"tag":184,"props":9522,"children":9523},{"style":197},[9524],{"type":67,"value":355},{"type":62,"tag":184,"props":9526,"children":9527},{"style":203},[9528],{"type":67,"value":452},{"type":62,"tag":184,"props":9530,"children":9531},{"style":197},[9532],{"type":67,"value":287},{"type":62,"tag":184,"props":9534,"children":9535},{"style":275},[9536],{"type":67,"value":7400},{"type":62,"tag":184,"props":9538,"children":9539},{"style":203},[9540],{"type":67,"value":297},{"type":62,"tag":184,"props":9542,"children":9543},{"style":197},[9544],{"type":67,"value":297},{"type":62,"tag":184,"props":9546,"children":9547},{"style":1052},[9548],{"type":67,"value":9549},"response",{"type":62,"tag":184,"props":9551,"children":9552},{"style":197},[9553],{"type":67,"value":452},{"type":62,"tag":184,"props":9555,"children":9556},{"style":259},[9557],{"type":67,"value":312},{"type":62,"tag":184,"props":9559,"children":9560},{"style":203},[9561],{"type":67,"value":9562}," response",{"type":62,"tag":184,"props":9564,"children":9565},{"style":197},[9566],{"type":67,"value":287},{"type":62,"tag":184,"props":9568,"children":9569},{"style":275},[9570],{"type":67,"value":7427},{"type":62,"tag":184,"props":9572,"children":9573},{"style":203},[9574],{"type":67,"value":9575},"())",{"type":62,"tag":184,"props":9577,"children":9578},{"style":197},[9579],{"type":67,"value":881},{"type":62,"tag":184,"props":9581,"children":9582},{"class":186,"line":255},[9583,9587],{"type":62,"tag":184,"props":9584,"children":9585},{"style":197},[9586],{"type":67,"value":369},{"type":62,"tag":184,"props":9588,"children":9589},{"style":203},[9590],{"type":67,"value":374},{"type":62,"tag":184,"props":9592,"children":9593},{"class":186,"line":320},[9594],{"type":62,"tag":184,"props":9595,"children":9596},{"emptyLinePlaceholder":239},[9597],{"type":67,"value":242},{"type":62,"tag":184,"props":9599,"children":9600},{"class":186,"line":363},[9601],{"type":62,"tag":184,"props":9602,"children":9603},{"style":249},[9604],{"type":67,"value":9605},"\u002F\u002F CORRECT — call the server function; the client build gets an RPC stub\n",{"type":62,"tag":184,"props":9607,"children":9608},{"class":186,"line":377},[9609,9613,9617,9621,9625,9629,9633,9637,9641,9645,9649],{"type":62,"tag":184,"props":9610,"children":9611},{"style":191},[9612],{"type":67,"value":803},{"type":62,"tag":184,"props":9614,"children":9615},{"style":259},[9616],{"type":67,"value":808},{"type":62,"tag":184,"props":9618,"children":9619},{"style":203},[9620],{"type":67,"value":105},{"type":62,"tag":184,"props":9622,"children":9623},{"style":197},[9624],{"type":67,"value":272},{"type":62,"tag":184,"props":9626,"children":9627},{"style":275},[9628],{"type":67,"value":552},{"type":62,"tag":184,"props":9630,"children":9631},{"style":203},[9632],{"type":67,"value":297},{"type":62,"tag":184,"props":9634,"children":9635},{"style":197},[9636],{"type":67,"value":355},{"type":62,"tag":184,"props":9638,"children":9639},{"style":224},[9640],{"type":67,"value":2471},{"type":62,"tag":184,"props":9642,"children":9643},{"style":197},[9644],{"type":67,"value":355},{"type":62,"tag":184,"props":9646,"children":9647},{"style":203},[9648],{"type":67,"value":842},{"type":62,"tag":184,"props":9650,"children":9651},{"style":197},[9652],{"type":67,"value":847},{"type":62,"tag":184,"props":9654,"children":9655},{"class":186,"line":385},[9656,9660,9664,9668,9672,9676,9680],{"type":62,"tag":184,"props":9657,"children":9658},{"style":275},[9659],{"type":67,"value":855},{"type":62,"tag":184,"props":9661,"children":9662},{"style":197},[9663],{"type":67,"value":341},{"type":62,"tag":184,"props":9665,"children":9666},{"style":197},[9667],{"type":67,"value":307},{"type":62,"tag":184,"props":9669,"children":9670},{"style":259},[9671],{"type":67,"value":312},{"type":62,"tag":184,"props":9673,"children":9674},{"style":275},[9675],{"type":67,"value":2507},{"type":62,"tag":184,"props":9677,"children":9678},{"style":203},[9679],{"type":67,"value":282},{"type":62,"tag":184,"props":9681,"children":9682},{"style":197},[9683],{"type":67,"value":881},{"type":62,"tag":184,"props":9685,"children":9686},{"class":186,"line":394},[9687,9691],{"type":62,"tag":184,"props":9688,"children":9689},{"style":197},[9690],{"type":67,"value":369},{"type":62,"tag":184,"props":9692,"children":9693},{"style":203},[9694],{"type":67,"value":374},{"type":62,"tag":70,"props":9696,"children":9697},{},[9698,9700,9706],{"type":67,"value":9699},"Relative ",{"type":62,"tag":76,"props":9701,"children":9703},{"className":9702},[],[9704],{"type":67,"value":9705},"fetch",{"type":67,"value":9707}," is fine in a browser-only event handler. It is not a universal loader data strategy.",{"type":62,"tag":166,"props":9709,"children":9711},{"id":9710},"cross-references",[9712],{"type":67,"value":9713},"Cross-References",{"type":62,"tag":1013,"props":9715,"children":9716},{},[9717,9728,9737,9761],{"type":62,"tag":1080,"props":9718,"children":9719},{},[9720,9726],{"type":62,"tag":115,"props":9721,"children":9723},{"href":9722},"..\u002Fexecution-model\u002FSKILL.md",[9724],{"type":67,"value":9725},"start-core\u002Fexecution-model",{"type":67,"value":9727}," — understanding where code runs",{"type":62,"tag":1080,"props":9729,"children":9730},{},[9731,9735],{"type":62,"tag":115,"props":9732,"children":9733},{"href":6653},[9734],{"type":67,"value":6656},{"type":67,"value":9736}," — composing server functions with middleware",{"type":62,"tag":1080,"props":9738,"children":9739},{},[9740,9744,9746,9752,9753,9759],{"type":62,"tag":115,"props":9741,"children":9742},{"href":117},[9743],{"type":67,"value":120},{"type":67,"value":9745}," — sessions, cookies, OAuth, CSRF, rate limiting (the server-side half of auth; ",{"type":62,"tag":76,"props":9747,"children":9749},{"className":9748},[],[9750],{"type":67,"value":9751},"getCurrentUser",{"type":67,"value":9133},{"type":62,"tag":76,"props":9754,"children":9756},{"className":9755},[],[9757],{"type":67,"value":9758},"useSession",{"type":67,"value":9760},"-style helpers belong here, not at module scope)",{"type":62,"tag":1080,"props":9762,"children":9763},{},[9764,9770],{"type":62,"tag":115,"props":9765,"children":9767},{"href":9766},"..\u002F..\u002F..\u002F..\u002Frouter-core\u002Fskills\u002Frouter-core\u002Fauth-and-guards\u002FSKILL.md",[9768],{"type":67,"value":9769},"router-core\u002Fauth-and-guards",{"type":67,"value":9771}," — routing-side UX guards; data auth belongs in the server function, server route, or API endpoint handler\u002Fmiddleware",{"type":62,"tag":9773,"props":9774,"children":9775},"style",{},[9776],{"type":67,"value":9777},"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":9779,"total":2639},[9780,9798,9813,9829,9842,9861,9872],{"slug":9781,"name":9781,"fn":9782,"description":9783,"org":9784,"tags":9785,"stars":23,"repoUrl":24,"updatedAt":9797},"auth-and-guards","implement route protection in TanStack Router","Route protection with beforeLoad, redirect()\u002Fthrow redirect(), isRedirect helper, authenticated layout routes (_authenticated), non-redirect auth (inline login), RBAC with roles and permissions, auth provider integration (Auth0, Clerk, Supabase), router context for auth state.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9786,9788,9791,9793,9794],{"name":9787,"slug":6281,"type":15},"Auth",{"name":9789,"slug":9790,"type":15},"Frontend","frontend",{"name":9792,"slug":35,"type":15},"Routing",{"name":9,"slug":8,"type":15},{"name":9795,"slug":9796,"type":15},"TanStack Router","tanstack-router","2026-07-30T05:27:07.639032",{"slug":9799,"name":9799,"fn":9800,"description":9801,"org":9802,"tags":9803,"stars":23,"repoUrl":24,"updatedAt":9812},"auth-server-primitives","implement server-side authentication primitives","Server-side authentication primitives for TanStack Start: session cookies (HttpOnly, Secure, SameSite, __Host- prefix), session read\u002Fissue\u002Fdestroy via createServerFn and middleware, OAuth authorization-code flow with state and PKCE, password-reset enumeration defense, CSRF for non-GET RPCs, rate limiting auth endpoints, session rotation on privilege change. Pairs with router-core\u002Fauth-and-guards for the routing side.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9804,9805,9808,9811],{"name":9787,"slug":6281,"type":15},{"name":9806,"slug":9807,"type":15},"OAuth","oauth",{"name":9809,"slug":9810,"type":15},"Security","security",{"name":9,"slug":8,"type":15},"2026-07-30T05:26:59.504396",{"slug":9814,"name":9814,"fn":9815,"description":9816,"org":9817,"tags":9818,"stars":23,"repoUrl":24,"updatedAt":9828},"code-splitting","configure code splitting in TanStack Router","Automatic code splitting (autoCodeSplitting), .lazy.tsx convention, createLazyFileRoute, createLazyRoute, lazyRouteComponent, getRouteApi for typed hooks in split files, codeSplitGroupings per-route override, splitBehavior programmatic config, critical vs non-critical properties.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9819,9822,9823,9826,9827],{"name":9820,"slug":9821,"type":15},"Engineering","engineering",{"name":9789,"slug":9790,"type":15},{"name":9824,"slug":9825,"type":15},"Performance","performance",{"name":9,"slug":8,"type":15},{"name":9795,"slug":9796,"type":15},"2026-07-30T05:27:11.494406",{"slug":9830,"name":9830,"fn":9831,"description":9832,"org":9833,"tags":9834,"stars":23,"repoUrl":24,"updatedAt":9841},"data-loading","manage data loading in TanStack Router","Route loader option, loaderDeps for cache keys, staleTime\u002FgcTime\u002F defaultPreloadStaleTime SWR caching, pendingComponent\u002FpendingMs\u002F pendingMinMs, errorComponent\u002FonError\u002FonCatch, beforeLoad, router context and createRootRouteWithContext DI pattern, router.invalidate, Await component, deferred data loading with unawaited promises.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9835,9838,9839,9840],{"name":9836,"slug":9837,"type":15},"Caching","caching",{"name":9824,"slug":9825,"type":15},{"name":9,"slug":8,"type":15},{"name":9795,"slug":9796,"type":15},"2026-07-30T05:26:54.487943",{"slug":9843,"name":9843,"fn":9844,"description":9845,"org":9846,"tags":9847,"stars":23,"repoUrl":24,"updatedAt":9860},"deployment","deploy TanStack Start applications","Deploy to Cloudflare Workers, Netlify, Vercel, Node.js\u002FDocker, Bun, Railway. Selective SSR (ssr option per route), SPA mode, static prerendering, ISR with Cache-Control headers, SEO and head management.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9848,9851,9853,9856,9857],{"name":9849,"slug":9850,"type":15},"Cloudflare","cloudflare",{"name":9852,"slug":9843,"type":15},"Deployment",{"name":9854,"slug":9855,"type":15},"Netlify","netlify",{"name":9,"slug":8,"type":15},{"name":9858,"slug":9859,"type":15},"Vercel","vercel","2026-07-30T05:26:50.509927",{"slug":9862,"name":9862,"fn":9863,"description":9864,"org":9865,"tags":9866,"stars":23,"repoUrl":24,"updatedAt":9871},"execution-model","manage isomorphic execution models","Isomorphic-by-default principle, environment boundary functions (createServerFn, createServerOnlyFn, createClientOnlyFn, createIsomorphicFn), ClientOnly component, useHydrated hook, import protection, dead code elimination, environment variable safety (VITE_ prefix, process.env).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9867,9870],{"name":9868,"slug":9869,"type":15},"Architecture","architecture",{"name":9,"slug":8,"type":15},"2026-07-30T05:27:04.558441",{"slug":6472,"name":6472,"fn":9873,"description":9874,"org":9875,"tags":9876,"stars":23,"repoUrl":24,"updatedAt":9882},"implement TanStack Router middleware","createMiddleware, request middleware (.server only), server function middleware (.client + .server), context passing via next({ context }), sendContext for client-server transfer, global middleware via createStart in src\u002Fstart.ts, middleware factories, method order enforcement, fetch override precedence.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9877,9878,9879,9881],{"name":13,"slug":14,"type":15},{"name":9789,"slug":9790,"type":15},{"name":9880,"slug":6472,"type":15},"Middleware",{"name":9,"slug":8,"type":15},"2026-07-30T05:26:58.546019",{"items":9884,"total":10022},[9885,9899,9911,9923,9936,9948,9958,9968,9981,9991,10002,10012],{"slug":9886,"name":9886,"fn":9887,"description":9888,"org":9889,"tags":9890,"stars":9896,"repoUrl":9897,"updatedAt":9898},"aggregation","perform data aggregation in TanStack Table","Aggregate TanStack Table columns independently of grouping, including grand totals, caller-selected row totals, multiple keyed aggregations, custom context-based definitions, grouped merges, manual values, and worker constraints.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9891,9894,9895],{"name":9892,"slug":9893,"type":15},"Data Analysis","data-analysis",{"name":9789,"slug":9790,"type":15},{"name":9,"slug":8,"type":15},28175,"https:\u002F\u002Fgithub.com\u002FTanStack\u002Ftable","2026-07-30T05:25:59.429787",{"slug":9900,"name":9900,"fn":9901,"description":9902,"org":9903,"tags":9904,"stars":9896,"repoUrl":9897,"updatedAt":9910},"api-not-found","diagnose TanStack Table API errors","Diagnose missing TanStack Table v9 exports, options, state slices, and instance methods. Load before inventing an API when code sees a type error, undefined feature method, absent object key, adapter mismatch, or v8-shaped example.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9905,9908,9909],{"name":9906,"slug":9907,"type":15},"Debugging","debugging",{"name":9789,"slug":9790,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:26:05.418735",{"slug":9912,"name":9912,"fn":9913,"description":9914,"org":9915,"tags":9916,"stars":9896,"repoUrl":9897,"updatedAt":9922},"cell-selection","select rectangular cell ranges in tables","Select rectangular cell ranges with cellSelectionFeature: two-corner range state keyed by row and column id, mousedown\u002Fmouseenter handlers, selection edges, render-order resolution under pinning, and autoResetCellSelection. Load when ranges widen unexpectedly after sorting or column reordering, when a drag re-renders the whole table, or when building copy-to-clipboard from a selection.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9917,9918,9919],{"name":9892,"slug":9893,"type":15},{"name":9,"slug":8,"type":15},{"name":9920,"slug":9921,"type":15},"UI Components","ui-components","2026-07-30T05:25:38.403427",{"slug":9924,"name":9924,"fn":9925,"description":9926,"org":9927,"tags":9928,"stars":9896,"repoUrl":9897,"updatedAt":9935},"client-vs-server","manage TanStack Table data pipelines","Choose client or server ownership for filtering, grouping, sorting, expanding, and pagination in TanStack Table v9. Load for manual* flags, mixed pipelines, server counts, or deciding which dataset each row-model stage receives.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9929,9932,9933,9934],{"name":9930,"slug":9931,"type":15},"Data Pipeline","data-pipeline",{"name":9789,"slug":9790,"type":15},{"name":9824,"slug":9825,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:25:45.400104",{"slug":9937,"name":9937,"fn":9938,"description":9939,"org":9940,"tags":9941,"stars":9896,"repoUrl":9897,"updatedAt":9947},"column-faceting","build faceted filter UIs","Build faceted filter UIs with columnFacetingFeature, facetedRowModel, facetedUniqueValues, and facetedMinMaxValues. Load for facet counts, numeric ranges, own-filter exclusion, or server-page facet completeness.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9942,9945,9946],{"name":9943,"slug":9944,"type":15},"Data Visualization","data-visualization",{"name":9789,"slug":9790,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:25:41.397257",{"slug":9949,"name":9949,"fn":9950,"description":9951,"org":9952,"tags":9953,"stars":9896,"repoUrl":9897,"updatedAt":9957},"column-filtering","implement column filtering in TanStack Table","Filter columns with columnFilteringFeature, filteredRowModel, filterFns, filterMeta, nested-row direction, and manualFiltering. Load for accessor compatibility, controlled filter updaters, fuzzy metadata, or client\u002Fserver ownership.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9954,9955,9956],{"name":9892,"slug":9893,"type":15},{"name":9789,"slug":9790,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:25:53.391632",{"slug":9959,"name":9959,"fn":9960,"description":9961,"org":9962,"tags":9963,"stars":9896,"repoUrl":9897,"updatedAt":9967},"column-ordering","manage TanStack Table column ordering","Control TanStack Table v9 leaf columnOrder with stable IDs while accounting for pinning regions, visibility, and groupedColumnMode precedence. Load for drag-and-drop columns or rendered order that differs from state.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9964,9965,9966],{"name":9789,"slug":9790,"type":15},{"name":9,"slug":8,"type":15},{"name":9920,"slug":9921,"type":15},"2026-07-30T05:26:03.37801",{"slug":9969,"name":9969,"fn":9970,"description":9971,"org":9972,"tags":9973,"stars":9896,"repoUrl":9897,"updatedAt":9980},"column-pinning","configure column pinning in TanStack Table","Pin columns into logical start, center, and end regions with columnPinningFeature and renderer-owned sticky CSS. Load for RTL offsets, z-index, backgrounds, overflow, widths, gaps, or overlaps.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9974,9977,9978,9979],{"name":9975,"slug":9976,"type":15},"CSS","css",{"name":9789,"slug":9790,"type":15},{"name":9,"slug":8,"type":15},{"name":9920,"slug":9921,"type":15},"2026-07-30T05:25:55.377366",{"slug":9982,"name":9982,"fn":9983,"description":9984,"org":9985,"tags":9986,"stars":9896,"repoUrl":9897,"updatedAt":9990},"column-resizing","implement column resizing in TanStack Table","Wire columnResizingFeature, header.getResizeHandler, resize mode and direction, pointer or touch events, and performant CSS-variable updates. Load when resize state changes but widths do not, or large tables resize slowly.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9987,9988,9989],{"name":9789,"slug":9790,"type":15},{"name":9,"slug":8,"type":15},{"name":9920,"slug":9921,"type":15},"2026-07-30T05:25:51.400011",{"slug":9992,"name":9992,"fn":9993,"description":9994,"org":9995,"tags":9996,"stars":9896,"repoUrl":9897,"updatedAt":10001},"column-sizing","configure column sizing in TanStack Table","Use columnSizingFeature numeric size, minSize, maxSize, getSize, getStart, getAfter, and total-size APIs in table, grid, or flex CSS. Load for auto or percentage misconceptions and sizing\u002Fpinning layout mismatch.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[9997,9998,9999,10000],{"name":9975,"slug":9976,"type":15},{"name":9789,"slug":9790,"type":15},{"name":9,"slug":8,"type":15},{"name":9920,"slug":9921,"type":15},"2026-07-30T05:25:48.703799",{"slug":10003,"name":10003,"fn":10004,"description":10005,"org":10006,"tags":10007,"stars":9896,"repoUrl":9897,"updatedAt":10011},"column-visibility","manage column visibility in TanStack Table","Hide columns with columnVisibilityFeature while rendering visibility-aware header, column, and cell collections. Load when hidden columns remain in the DOM, false-versus-absent state is confused, or enableHiding is misunderstood.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10008,10009,10010],{"name":9789,"slug":9790,"type":15},{"name":9,"slug":8,"type":15},{"name":9920,"slug":9921,"type":15},"2026-07-30T05:25:47.367943",{"slug":10013,"name":10013,"fn":10014,"description":10015,"org":10016,"tags":10017,"stars":9896,"repoUrl":9897,"updatedAt":10021},"core","build data grids with TanStack Table","Use TanStack Table v9 as a headless data-grid state and row-processing engine. Load for first-table architecture, stable data and columns, row numbering with getDisplayIndex, semantic rendering, framework adapter choice, or deciding what Table owns versus the renderer.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[10018,10019,10020],{"name":9892,"slug":9893,"type":15},{"name":9789,"slug":9790,"type":15},{"name":9920,"slug":9921,"type":15},"2026-07-30T05:25:52.366295",125]