jarle/bun-skills/bun-guides-ecosystem-ssr-react

Claude Code and agent skill by jarle/bun-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Server-side render (SSR) a React component

Install

npx vskill@latest install jarle/bun-skills/bun-guides-ecosystem-ssr-react

SKILL.md

The same SKILL.md was published earlier as jarle/bun-skills/bun-guides-ecosystem-ssr-react.

Server-side render (SSR) a React component

To get started, install react & react-dom:

sh terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
# Any package manager can be used
bun add react react-dom

To render a React component to an HTML stream server-side (SSR):

tsx ssr-react.tsx icon="file-code" theme={"theme":{"light":"github-light","dark":"dracula"}}
import { renderToReadableStream } from "react-dom/server";
function Component(props: { message: string }) {
return (
<body>
<h1>{props.message}</h1>
</body>
);
}
const stream = await renderToReadableStream(<Component message="Hello from server!" />);

Combining this with Bun.serve(), we get a simple SSR HTTP server:

tsx server.ts icon="https://mintcdn.com/bun-1dd33a4e/nIz6GtMH5K-dfXeV/icons/typescript.svg?fit=max&auto=format&n=nIz6GtMH5K-dfXeV&q=85&s=5d73d76daf7eb7b158469d8c30d349b0" theme={"theme":{"light":"github-light","dark":"dracula"}}
Bun.serve({
async fetch() {
const stream = await renderToReadableStream(<Component message="Hello from server!" />);
return new Response(stream, {
headers: { "Content-Type": "text/html" },
});
},
});

React 19 and later includes an SSR optimization that takes advantage of Bun's "direct" ReadableStream implementation. If you run into an error like export named 'renderToReadableStream' not found, please make sure to install version 19 of react & react-dom, or import from react-dom/server.browser instead of react-dom/server. See facebook/react#28941 for more information.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
9
Repository forks
1
7-day trend score
17

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/jarle/bun-skills/bun-guides-ecosystem-ssr-react/badge)](https://verified-skill.com/skills/jarle/bun-skills/bun-guides-ecosystem-ssr-react)

Something wrong with this skill or its page? Tell us.