Skip to content

Build server-rendered React apps with Bun using custom SSR, hydration, and streaming, no framework required.

CCM score
50 of 100
skills.sh installs
416
GitHub stars
257
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers server entry, client hydration, streaming SSR with Suspense, data fetching, routing, and CSS handling
  • Includes a Bun.serve server, a client hydrateRoot entry, and Bun.build scripts for client and production bundles
  • Provides a hot-reload dev script (dev.ts) and a production build script (build-prod.ts) with sourcemaps
  • Designed for teams building custom SSR without a framework, with a troubleshooting table for hydration mismatches

Install

$ npx -y skills add secondsky/claude-skills --skill bun-react-ssr -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Bun React SSR

Build custom server-rendered React applications with Bun.

Quick Start

# Initialize project
mkdir my-ssr-app && cd my-ssr-app
bun init

# Install dependencies
bun add react react-dom
bun add -D @types/react @types/react-dom

Basic SSR Setup

Server Entry

// src/server.tsx
import { renderToString } from "react-dom/server";
import App from "./App";

Bun.serve({
  port: 3000,
  async fetch(req) {
    const url = new URL(req.url);

    // Serve static files
    if (url.pathname.startsWith("/static/")) {
      const file = Bun.file(`./public${url.pathname}`);
      if (await file.exists()) {
        return new Response(file);
      }
    }

    // Render React app
    const html = renderToString(<App url={url.pathname} />);

Details

Repository
github.com/secondsky/claude-skills
Categories
Frontend & UI Code, Backend & APIs
First seen
Jun 3, 2026

Questions

What does the bun-react-ssr skill help me build?

The bun-react-ssr skill guides you through building custom server-rendered React applications with Bun, without a framework. It covers renderToString, streaming SSR, hydration with hydrateRoot, and simple data fetching on the server.

How do I install the bun-react-ssr skill?

Run npx -y skills add secondsky/claude-skills --skill bun-react-ssr -y in your project. After that, bun-react-ssr lets your agent set up a Bun server that renders React to HTML and hydrates it in the browser.

Which skills lead the Frontend & UI Code category next to bun-react-ssr?

Among Frontend & UI Code skills, vercel-react-best-practices, web-design-guidelines, design-taste-frontend, vercel-composition-patterns and lark-apps sit alongside bun-react-ssr. Where bun-react-ssr sets itself apart is its focus on server rendering with Bun itself, including streaming SSR and hydration.

Does bun-react-ssr need any extra accounts, keys or framework setup?

bun-react-ssr needs Bun and the react and react-dom packages, which its Quick Start installs with bun add. It does not depend on a framework such as Next.js, since the skill is built around a custom Bun.serve setup.

More from secondsky/claude-skills

All 116

Similar to Bun React Ssr

More Frontend & UI Code