[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79A0MG2F7ZZYC4WFRP3ATRF":3,"skill-same:01M79A0MG2F7ZZYC4WFRP3ATRF":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":14,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M79A0MG2F7ZZYC4WFRP3ATRF","bun-react-ssr",null,"Use when building server-rendered React with Bun, including streaming SSR, hydration, renderToString, or custom SSR without a framework.","Elogic360\u002Fsoftware-factory","Elogic360","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F156535519?v=4","01M74NH3F0RB13PWB7JZDE2V80","elogic360","01M74NH3FPC65082MDZVMFHDM3",0,"MIT","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fbun\u002Fskills\u002Fbun-react-ssr\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bun-react-ssr\ndescription: Use when building server-rendered React with Bun, including streaming SSR, hydration, renderToString, or custom SSR without a framework.\nmetadata:\n  version: \"1.0.0\"\nlicense: MIT\n---\n\n# Bun React SSR\n\nBuild custom server-rendered React applications with Bun.\n\n## Quick Start\n\n```bash\n# Initialize project\nmkdir my-ssr-app && cd my-ssr-app\nbun init\n\n# Install dependencies\nbun add react react-dom\nbun add -D @types\u002Freact @types\u002Freact-dom\n```\n\n## Basic SSR Setup\n\n### Server Entry\n\n```typescript\n\u002F\u002F src\u002Fserver.tsx\nimport { renderToString } from \"react-dom\u002Fserver\";\nimport App from \".\u002FApp\";\n\nBun.serve({\n  port: 3000,\n  async fetch(req) {\n    const url = new URL(req.url);\n\n    \u002F\u002F Serve static files\n    if (url.pathname.startsWith(\"\u002Fstatic\u002F\")) {\n      const file = Bun.file(`.\u002Fpublic${url.pathname}`);\n      if (await file.exists()) {\n        return new Response(file);\n      }\n    }\n\n    \u002F\u002F Render React app\n    const html = renderToString(\u003CApp url={url.pathname} \u002F>);\n\n    return new Response(\n      `\u003C!DOCTYPE html>\n      \u003Chtml>\n        \u003Chead>\n          \u003Cmeta charset=\"utf-8\">\n          \u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n          \u003Ctitle>React SSR\u003C\u002Ftitle>\n        \u003C\u002Fhead>\n        \u003Cbody>\n          \u003Cdiv id=\"root\">${html}\u003C\u002Fdiv>\n          \u003Cscript src=\"\u002Fstatic\u002Fclient.js\">\u003C\u002Fscript>\n        \u003C\u002Fbody>\n      \u003C\u002Fhtml>`,\n      {\n        headers: { \"Content-Type\": \"text\u002Fhtml\" },\n      }\n    );\n  },\n});\n\nconsole.log(\"Server running on http:\u002F\u002Flocalhost:3000\");\n```\n\n### Client Entry\n\n```tsx\n\u002F\u002F src\u002Fclient.tsx\nimport { hydrateRoot } from \"react-dom\u002Fclient\";\nimport App from \".\u002FApp\";\n\nhydrateRoot(\n  document.getElementById(\"root\")!,\n  \u003CApp url={window.location.pathname} \u002F>\n);\n```\n\n### React App\n\n```tsx\n\u002F\u002F src\u002FApp.tsx\ninterface AppProps {\n  url: string;\n}\n\nexport default function App({ url }: AppProps) {\n  return (\n    \u003Cdiv>\n      \u003Ch1>React SSR with Bun\u003C\u002Fh1>\n      \u003Cp>Current path: {url}\u003C\u002Fp>\n      \u003Cbutton onClick={() => alert(\"Hydrated!\")}>Click me\u003C\u002Fbutton>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n## Build Client Bundle\n\n```typescript\n\u002F\u002F build.ts\nawait Bun.build({\n  entrypoints: [\".\u002Fsrc\u002Fclient.tsx\"],\n  outdir: \".\u002Fpublic\u002Fstatic\",\n  target: \"browser\",\n  minify: true,\n  splitting: true,\n});\n```\n\n```bash\n# Build client\nbun run build.ts\n\n# Start server\nbun run src\u002Fserver.tsx\n```\n\n## Streaming SSR\n\n```tsx\n\u002F\u002F src\u002Fserver-streaming.tsx\nimport { renderToReadableStream } from \"react-dom\u002Fserver\";\nimport App from \".\u002FApp\";\n\nBun.serve({\n  port: 3000,\n  async fetch(req) {\n    const url = new URL(req.url);\n\n    const stream = await renderToReadableStream(\n      \u003CApp url={url.pathname} \u002F>,\n      {\n        bootstrapScripts: [\"\u002Fstatic\u002Fclient.js\"],\n        onError(error) {\n          console.error(error);\n        },\n      }\n    );\n\n    \u002F\u002F Wait for shell to be ready (Suspense boundaries)\n    await stream.allReady;\n\n    return new Response(stream, {\n      headers: { \"Content-Type\": \"text\u002Fhtml\" },\n    });\n  },\n});\n```\n\n### With Suspense\n\n```tsx\n\u002F\u002F src\u002FApp.tsx\nimport { Suspense } from \"react\";\n\nfunction SlowComponent() {\n  \u002F\u002F This would be a data fetching component\n  return \u003Cdiv>Loaded!\u003C\u002Fdiv>;\n}\n\nexport default function App({ url }: { url: string }) {\n  return (\n    \u003Chtml>\n      \u003Chead>\n        \u003Ctitle>Streaming SSR\u003C\u002Ftitle>\n      \u003C\u002Fhead>\n      \u003Cbody>\n        \u003Cdiv id=\"root\">\n          \u003Ch1>Fast Shell\u003C\u002Fh1>\n          \u003CSuspense fallback={\u003Cdiv>Loading...\u003C\u002Fdiv>}>\n            \u003CSlowComponent \u002F>\n          \u003C\u002FSuspense>\n        \u003C\u002Fdiv>\n      \u003C\u002Fbody>\n    \u003C\u002Fhtml>\n  );\n}\n```\n\n## Data Fetching\n\n### Server-Side Data\n\n```tsx\n\u002F\u002F src\u002Fserver.tsx\nimport { renderToString } from \"react-dom\u002Fserver\";\nimport { Database } from \"bun:sqlite\";\nimport App from \".\u002FApp\";\n\nconst db = new Database(\"data.sqlite\");\n\nBun.serve({\n  async fetch(req) {\n    const url = new URL(req.url);\n\n    \u002F\u002F Fetch data server-side\n    const users = db.query(\"SELECT * FROM users\").all();\n\n    const html = renderToString(\n      \u003CApp url={url.pathname} initialData={{ users }} \u002F>\n    );\n\n    return new Response(\n      `\u003C!DOCTYPE html>\n      \u003Chtml>\n        \u003Chead>\u003Ctitle>SSR\u003C\u002Ftitle>\u003C\u002Fhead>\n        \u003Cbody>\n          \u003Cdiv id=\"root\">${html}\u003C\u002Fdiv>\n          \u003Cscript>\n            window.__INITIAL_DATA__ = ${JSON.stringify({ users })};\n          \u003C\u002Fscript>\n          \u003Cscript src=\"\u002Fstatic\u002Fclient.js\">\u003C\u002Fscript>\n        \u003C\u002Fbody>\n      \u003C\u002Fhtml>`,\n      { headers: { \"Content-Type\": \"text\u002Fhtml\" } }\n    );\n  },\n});\n```\n\n### Client Hydration\n\n```tsx\n\u002F\u002F src\u002Fclient.tsx\nimport { hydrateRoot } from \"react-dom\u002Fclient\";\nimport App from \".\u002FApp\";\n\nconst initialData = (window as any).__INITIAL_DATA__;\n\nhydrateRoot(\n  document.getElementById(\"root\")!,\n  \u003CApp url={window.location.pathname} initialData={initialData} \u002F>\n);\n```\n\n## Routing\n\n### Simple Router\n\n```tsx\n\u002F\u002F src\u002FRouter.tsx\nimport { useState, useEffect } from \"react\";\n\ninterface Route {\n  path: string;\n  component: React.ComponentType;\n}\n\ninterface RouterProps {\n  routes: Route[];\n  initialPath: string;\n}\n\nexport function Router({ routes, initialPath }: RouterProps) {\n  const [path, setPath] = useState(initialPath);\n\n  useEffect(() => {\n    const handlePopState = () => setPath(window.location.pathname);\n    window.addEventListener(\"popstate\", handlePopState);\n    return () => window.removeEventListener(\"popstate\", handlePopState);\n  }, []);\n\n  const route = routes.find((r) => r.path === path);\n  const Component = route?.component || NotFound;\n\n  return \u003CComponent \u002F>;\n}\n\nexport function Link({ href, children }: { href: string; children: React.ReactNode }) {\n  const handleClick = (e: React.MouseEvent) => {\n    e.preventDefault();\n    window.history.pushState({}, \"\", href);\n    window.dispatchEvent(new PopStateEvent(\"popstate\"));\n  };\n\n  return \u003Ca href={href} onClick={handleClick}>{children}\u003C\u002Fa>;\n}\n\nfunction NotFound() {\n  return \u003Ch1>404 - Not Found\u003C\u002Fh1>;\n}\n```\n\n## CSS Handling\n\n### Inline Styles\n\n```tsx\nconst html = renderToString(\u003CApp \u002F>);\n\nreturn new Response(\n  `\u003C!DOCTYPE html>\n  \u003Chtml>\n    \u003Chead>\n      \u003Cstyle>${await Bun.file(\".\u002Fsrc\u002Fstyles.css\").text()}\u003C\u002Fstyle>\n    \u003C\u002Fhead>\n    \u003Cbody>\n      \u003Cdiv id=\"root\">${html}\u003C\u002Fdiv>\n    \u003C\u002Fbody>\n  \u003C\u002Fhtml>`,\n  { headers: { \"Content-Type\": \"text\u002Fhtml\" } }\n);\n```\n\n### External Stylesheet\n\n```tsx\n\u002F\u002F Build CSS\nawait Bun.build({\n  entrypoints: [\".\u002Fsrc\u002Fstyles.css\"],\n  outdir: \".\u002Fpublic\u002Fstatic\",\n});\n\n\u002F\u002F Link in HTML\n`\u003Clink rel=\"stylesheet\" href=\"\u002Fstatic\u002Fstyles.css\">`\n```\n\n## Development Setup\n\n### Hot Reload Development\n\n```typescript\n\u002F\u002F dev.ts\nimport { watch } from \"fs\";\n\nconst srcDir = \".\u002Fsrc\";\nlet serverProcess: Subprocess | null = null;\n\nasync function startServer() {\n  serverProcess?.kill();\n  serverProcess = Bun.spawn([\"bun\", \"run\", \"src\u002Fserver.tsx\"], {\n    stdout: \"inherit\",\n    stderr: \"inherit\",\n  });\n}\n\n\u002F\u002F Watch for changes\nwatch(srcDir, { recursive: true }, async (event, filename) => {\n  console.log(`Change detected: ${filename}`);\n  await startServer();\n});\n\nawait startServer();\nconsole.log(\"Dev server watching...\");\n```\n\n## Production Build\n\n```typescript\n\u002F\u002F build-prod.ts\n\n\u002F\u002F Build client\nawait Bun.build({\n  entrypoints: [\".\u002Fsrc\u002Fclient.tsx\"],\n  outdir: \".\u002Fdist\u002Fpublic\u002Fstatic\",\n  target: \"browser\",\n  minify: true,\n  splitting: true,\n  sourcemap: \"external\",\n});\n\n\u002F\u002F Build server\nawait Bun.build({\n  entrypoints: [\".\u002Fsrc\u002Fserver.tsx\"],\n  outdir: \".\u002Fdist\",\n  target: \"bun\",\n  minify: true,\n});\n\nconsole.log(\"Build complete!\");\n```\n\n## Common Errors\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| `Hydration mismatch` | Server\u002Fclient HTML differs | Check initial state |\n| `document is not defined` | SSR accessing DOM | Guard with typeof window |\n| `Cannot use hooks` | Hooks outside component | Check component structure |\n| `Flash of unstyled content` | CSS not loaded | Inline critical CSS |\n\n## Performance Tips\n\n1. **Use streaming SSR** for faster TTFB\n2. **Inline critical CSS** above the fold\n3. **Code split** client bundle\n4. **Cache rendered HTML** for static pages\n5. **Use Suspense** for progressive loading\n\n## When to Load References\n\nLoad `references\u002Fstreaming-patterns.md` when:\n- Complex Suspense boundaries\n- Selective hydration\n- Progressive enhancement\n\nLoad `references\u002Fcaching.md` when:\n- HTML caching strategies\n- CDN integration\n- Edge rendering\n","# Bun React SSR\n\nBuild custom server-rendered React applications with Bun.\n\n## Quick Start\n\n```bash\n# Initialize project\nmkdir my-ssr-app && cd my-ssr-app\nbun init\n\n# Install dependencies\nbun add react react-dom\nbun add -D @types\u002Freact @types\u002Freact-dom\n```\n\n## Basic SSR Setup\n\n### Server Entry\n\n```typescript\n\u002F\u002F src\u002Fserver.tsx\nimport { renderToString } from \"react-dom\u002Fserver\";\nimport App from \".\u002FApp\";\n\nBun.serve({\n  port: 3000,\n  async fetch(req) {\n    const url = new URL(req.url);\n\n    \u002F\u002F Serve static files\n    if (url.pathname.startsWith(\"\u002Fstatic\u002F\")) {\n      const file = Bun.file(`.\u002Fpublic${url.pathname}`);\n      if (await file.exists()) {\n        return new Response(file);\n      }\n    }\n\n    \u002F\u002F Render React app\n    const html = renderToString(\u003CApp url={url.pathname} \u002F>);\n\n    return new Response(\n      `\u003C!DOCTYPE html>\n      \u003Chtml>\n        \u003Chead>\n          \u003Cmeta charset=\"utf-8\">\n          \u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n          \u003Ctitle>React SSR\u003C\u002Ftitle>\n        \u003C\u002Fhead>\n        \u003Cbody>\n          \u003Cdiv id=\"root\">${html}\u003C\u002Fdiv>\n          \u003Cscript src=\"\u002Fstatic\u002Fclient.js\">\u003C\u002Fscript>\n        \u003C\u002Fbody>\n      \u003C\u002Fhtml>`,\n      {\n        headers: { \"Content-Type\": \"text\u002Fhtml\" },\n      }\n    );\n  },\n});\n\nconsole.log(\"Server running on http:\u002F\u002Flocalhost:3000\");\n```\n\n### Client Entry\n\n```tsx\n\u002F\u002F src\u002Fclient.tsx\nimport { hydrateRoot } from \"react-dom\u002Fclient\";\nimport App from \".\u002FApp\";\n\nhydrateRoot(\n  document.getElementById(\"root\")!,\n  \u003CApp url={window.location.pathname} \u002F>\n);\n```\n\n### React App\n\n```tsx\n\u002F\u002F src\u002FApp.tsx\ninterface AppProps {\n  url: string;\n}\n\nexport default function App({ url }: AppProps) {\n  return (\n    \u003Cdiv>\n      \u003Ch1>React SSR with Bun\u003C\u002Fh1>\n      \u003Cp>Current path: {url}\u003C\u002Fp>\n      \u003Cbutton onClick={() => alert(\"Hydrated!\")}>Click me\u003C\u002Fbutton>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n## Build Client Bundle\n\n```typescript\n\u002F\u002F build.ts\nawait Bun.build({\n  entrypoints: [\".\u002Fsrc\u002Fclient.tsx\"],\n  outdir: \".\u002Fpublic\u002Fstatic\",\n  target: \"browser\",\n  minify: true,\n  splitting: true,\n});\n```\n\n```bash\n# Build client\nbun run build.ts\n\n# Start server\nbun run src\u002Fserver.tsx\n```\n\n## Streaming SSR\n\n```tsx\n\u002F\u002F src\u002Fserver-streaming.tsx\nimport { renderToReadableStream } from \"react-dom\u002Fserver\";\nimport App from \".\u002FApp\";\n\nBun.serve({\n  port: 3000,\n  async fetch(req) {\n    const url = new URL(req.url);\n\n    const stream = await renderToReadableStream(\n      \u003CApp url={url.pathname} \u002F>,\n      {\n        bootstrapScripts: [\"\u002Fstatic\u002Fclient.js\"],\n        onError(error) {\n          console.error(error);\n        },\n      }\n    );\n\n    \u002F\u002F Wait for shell to be ready (Suspense boundaries)\n    await stream.allReady;\n\n    return new Response(stream, {\n      headers: { \"Content-Type\": \"text\u002Fhtml\" },\n    });\n  },\n});\n```\n\n### With Suspense\n\n```tsx\n\u002F\u002F src\u002FApp.tsx\nimport { Suspense } from \"react\";\n\nfunction SlowComponent() {\n  \u002F\u002F This would be a data fetching component\n  return \u003Cdiv>Loaded!\u003C\u002Fdiv>;\n}\n\nexport default function App({ url }: { url: string }) {\n  return (\n    \u003Chtml>\n      \u003Chead>\n        \u003Ctitle>Streaming SSR\u003C\u002Ftitle>\n      \u003C\u002Fhead>\n      \u003Cbody>\n        \u003Cdiv id=\"root\">\n          \u003Ch1>Fast Shell\u003C\u002Fh1>\n          \u003CSuspense fallback={\u003Cdiv>Loading...\u003C\u002Fdiv>}>\n            \u003CSlowComponent \u002F>\n          \u003C\u002FSuspense>\n        \u003C\u002Fdiv>\n      \u003C\u002Fbody>\n    \u003C\u002Fhtml>\n  );\n}\n```\n\n## Data Fetching\n\n### Server-Side Data\n\n```tsx\n\u002F\u002F src\u002Fserver.tsx\nimport { renderToString } from \"react-dom\u002Fserver\";\nimport { Database } from \"bun:sqlite\";\nimport App from \".\u002FApp\";\n\nconst db = new Database(\"data.sqlite\");\n\nBun.serve({\n  async fetch(req) {\n    const url = new URL(req.url);\n\n    \u002F\u002F Fetch data server-side\n    const users = db.query(\"SELECT * FROM users\").all();\n\n    const html = renderToString(\n      \u003CApp url={url.pathname} initialData={{ users }} \u002F>\n    );\n\n    return new Response(\n      `\u003C!DOCTYPE html>\n      \u003Chtml>\n        \u003Chead>\u003Ctitle>SSR\u003C\u002Ftitle>\u003C\u002Fhead>\n        \u003Cbody>\n          \u003Cdiv id=\"root\">${html}\u003C\u002Fdiv>\n          \u003Cscript>\n            window.__INITIAL_DATA__ = ${JSON.stringify({ users })};\n          \u003C\u002Fscript>\n          \u003Cscript src=\"\u002Fstatic\u002Fclient.js\">\u003C\u002Fscript>\n        \u003C\u002Fbody>\n      \u003C\u002Fhtml>`,\n      { headers: { \"Content-Type\": \"text\u002Fhtml\" } }\n    );\n  },\n});\n```\n\n### Client Hydration\n\n```tsx\n\u002F\u002F src\u002Fclient.tsx\nimport { hydrateRoot } from \"react-dom\u002Fclient\";\nimport App from \".\u002FApp\";\n\nconst initialData = (window as any).__INITIAL_DATA__;\n\nhydrateRoot(\n  document.getElementById(\"root\")!,\n  \u003CApp url={window.location.pathname} initialData={initialData} \u002F>\n);\n```\n\n## Routing\n\n### Simple Router\n\n```tsx\n\u002F\u002F src\u002FRouter.tsx\nimport { useState, useEffect } from \"react\";\n\ninterface Route {\n  path: string;\n  component: React.ComponentType;\n}\n\ninterface RouterProps {\n  routes: Route[];\n  initialPath: string;\n}\n\nexport function Router({ routes, initialPath }: RouterProps) {\n  const [path, setPath] = useState(initialPath);\n\n  useEffect(() => {\n    const handlePopState = () => setPath(window.location.pathname);\n    window.addEventListener(\"popstate\", handlePopState);\n    return () => window.removeEventListener(\"popstate\", handlePopState);\n  }, []);\n\n  const route = routes.find((r) => r.path === path);\n  const Component = route?.component || NotFound;\n\n  return \u003CComponent \u002F>;\n}\n\nexport function Link({ href, children }: { href: string; children: React.ReactNode }) {\n  const handleClick = (e: React.MouseEvent) => {\n    e.preventDefault();\n    window.history.pushState({}, \"\", href);\n    window.dispatchEvent(new PopStateEvent(\"popstate\"));\n  };\n\n  return \u003Ca href={href} onClick={handleClick}>{children}\u003C\u002Fa>;\n}\n\nfunction NotFound() {\n  return \u003Ch1>404 - Not Found\u003C\u002Fh1>;\n}\n```\n\n## CSS Handling\n\n### Inline Styles\n\n```tsx\nconst html = renderToString(\u003CApp \u002F>);\n\nreturn new Response(\n  `\u003C!DOCTYPE html>\n  \u003Chtml>\n    \u003Chead>\n      \u003Cstyle>${await Bun.file(\".\u002Fsrc\u002Fstyles.css\").text()}\u003C\u002Fstyle>\n    \u003C\u002Fhead>\n    \u003Cbody>\n      \u003Cdiv id=\"root\">${html}\u003C\u002Fdiv>\n    \u003C\u002Fbody>\n  \u003C\u002Fhtml>`,\n  { headers: { \"Content-Type\": \"text\u002Fhtml\" } }\n);\n```\n\n### External Stylesheet\n\n```tsx\n\u002F\u002F Build CSS\nawait Bun.build({\n  entrypoints: [\".\u002Fsrc\u002Fstyles.css\"],\n  outdir: \".\u002Fpublic\u002Fstatic\",\n});\n\n\u002F\u002F Link in HTML\n`\u003Clink rel=\"stylesheet\" href=\"\u002Fstatic\u002Fstyles.css\">`\n```\n\n## Development Setup\n\n### Hot Reload Development\n\n```typescript\n\u002F\u002F dev.ts\nimport { watch } from \"fs\";\n\nconst srcDir = \".\u002Fsrc\";\nlet serverProcess: Subprocess | null = null;\n\nasync function startServer() {\n  serverProcess?.kill();\n  serverProcess = Bun.spawn([\"bun\", \"run\", \"src\u002Fserver.tsx\"], {\n    stdout: \"inherit\",\n    stderr: \"inherit\",\n  });\n}\n\n\u002F\u002F Watch for changes\nwatch(srcDir, { recursive: true }, async (event, filename) => {\n  console.log(`Change detected: ${filename}`);\n  await startServer();\n});\n\nawait startServer();\nconsole.log(\"Dev server watching...\");\n```\n\n## Production Build\n\n```typescript\n\u002F\u002F build-prod.ts\n\n\u002F\u002F Build client\nawait Bun.build({\n  entrypoints: [\".\u002Fsrc\u002Fclient.tsx\"],\n  outdir: \".\u002Fdist\u002Fpublic\u002Fstatic\",\n  target: \"browser\",\n  minify: true,\n  splitting: true,\n  sourcemap: \"external\",\n});\n\n\u002F\u002F Build server\nawait Bun.build({\n  entrypoints: [\".\u002Fsrc\u002Fserver.tsx\"],\n  outdir: \".\u002Fdist\",\n  target: \"bun\",\n  minify: true,\n});\n\nconsole.log(\"Build complete!\");\n```\n\n## Common Errors\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| `Hydration mismatch` | Server\u002Fclient HTML differs | Check initial state |\n| `document is not defined` | SSR accessing DOM | Guard with typeof window |\n| `Cannot use hooks` | Hooks outside component | Check component structure |\n| `Flash of unstyled content` | CSS not loaded | Inline critical CSS |\n\n## Performance Tips\n\n1. **Use streaming SSR** for faster TTFB\n2. **Inline critical CSS** above the fold\n3. **Code split** client bundle\n4. **Cache rendered HTML** for static pages\n5. **Use Suspense** for progressive loading\n\n## When to Load References\n\nLoad `references\u002Fstreaming-patterns.md` when:\n- Complex Suspense boundaries\n- Selective hydration\n- Progressive enhancement\n\nLoad `references\u002Fcaching.md` when:\n- HTML caching strategies\n- CDN integration\n- Edge rendering\n",{"name":5,"license":15,"metadata":24,"description":7},{"version":25},"1.0.0","main","c475fc64e94e803b50d14a791dfee8853fbb2c5c","integrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fbun\u002Fskills\u002Fbun-react-ssr","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory","https:\u002F\u002Fgithub.com\u002FElogic360","2026-11-08 22:21:22",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Elogic360\u002Fsoftware-factory --skill bun-react-ssr",{"tool":38,"command":39},"bunx","bunx skills add Elogic360\u002Fsoftware-factory --skill bun-react-ssr",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Elogic360\u002Fsoftware-factory --skill bun-react-ssr","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fbun\u002Fskills\u002Fbun-react-ssr\u002FSKILL.md",true,[],[47,55,62,69,76,83],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":51,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M79G206MT3J6S0GY3C45P2KV","vss-summarize-video","Use to summarize a recorded video via the LVS summarization microservice (HITL-gated) with a VLM fallback. Not for report generation or live RTSP captioning.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-summarize-video\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":51,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M79G1WN63PGRE8CKD47WEBQ5","vss-setup-video-analytics-api","Use to deploy the vss-video-analytics-api REST service standalone (config-source, data-log bind, Elasticsearch, optional Kafka). Not for full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-video-analytics-api\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":51,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M79G1S9F7VY3EF6H53PRP5AN","vss-setup-behavior-analytics","Use to deploy the vss-behavior-analytics service standalone (entrypoint, config-source, optional calibration). Not for the full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-behavior-analytics\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":51,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M79G1N1S1Y27PFZPYMNK1MTQ","vss-search-archive","Use this skill to run top-level VSS fusion search on archived video, or to ingest video files \u002F RTSP streams for search. Do NOT use for ad-hoc visual Q&A (use vss-ask-video), live captioning (use vss-deploy-dense-captioning), or video summarization and reports (use vss-summarize-video).","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-search-archive\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":51,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M79G1H6WN0Q6C0VCAXCZX6B7","vss-query-analytics","Use this skill when reading video-analytics metrics, incidents, alerts, and sensor data via the VA-MCP server (port 9901). Not for live VLM or incident-range narrative reports.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-query-analytics\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":51,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M79G1DYPNXQS7QHZ0AAF5FX5","vss-manage-video-io-storage","Use to call the VIOS REST API (sensor list, timelines, clip extraction, snapshots, add\u002Fdelete sensors and streams). Not for VLM inference or search.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-manage-video-io-storage\u002FSKILL.md",[],[]]