bun-react-ssr
Use when building server-rendered React with Bun, including streaming SSR, hydration, renderToString, or custom SSR without a framework.
By secondsky · 280 installs
npx skills add secondsky/claude-skills --skill bun-react-ssr
Source repository · Upstream listing
Bun React SSR
Build custom server rendered React applications with Bun.
Quick Start
Basic SSR Setup
Server Entry
Client Entry
React App
Build Client Bundle
Streaming SSR
With Suspense
Data Fetching
Server Side Data
Client Hydration
Routing
Simple Router
CSS Handling
Inline Styles
External Stylesheet
Development Setup
Hot Reload Development
Production Build
Common Errors
Error Cause Fix
Hydration mismatch Server/client HTML differs Check initial state
document is not defined SSR accessing DOM Guard with typeof window
Cannot use hooks Hooks outside component Check component structure
Flash of unstyled content CSS not loaded Inline critical CSS
Performance Tips
1. Use streaming SSR for faster TTFB
2. Inline critical CSS above the fold
3. Code split client bundle
4. Cache rendered HTML for static pages
5. Use Suspense for progressive loading
When to Load References
Load references/streaming patterns.md when:
Complex Suspense boundaries
Selective hydration
Progressive enhancement
Load references/caching.md when:
HTML caching strategies
CDN integration
Edge rendering