From harness-claude
Pre-renders React components on the server with Next.js Pages Router, Remix loaders, or Express for SEO, fast initial loads, and per-request personalization on public pages.
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeThis skill uses the workspace's default tool permissions.
> Pre-render React components on the server for improved SEO and initial load performance
Optimizes SSR performance: analyzes SSR vs CSR trade-offs, implements React 18 streaming SSR with Suspense, mitigates hydration costs via selective islands, covers React Server Components and caching for fast TTFB/TTI. Use for slow FCP, SEO, or high bounce rates.
Builds Next.js 16+ apps with React Server Components using App Router, Cache Components, streaming SSR, Server Actions, and React 19 server-first patterns.
Guides React Server Components in Next.js: server vs client distinction, 'use client' directive, component boundaries, composition patterns, and data fetching.
Share bugs, ideas, or general feedback.
Pre-render React components on the server for improved SEO and initial load performance
getServerSideProps), Remix (loader), or custom Express + renderToStringgetServerSideProps to fetch data server-side:
export async function getServerSideProps(context: GetServerSidePropsContext) {
const data = await fetchData(context.params.id);
return { props: { data } };
}
loader function:
export async function loader({ params }: LoaderFunctionArgs) {
return json(await fetchData(params.id));
}
cache headers appropriately — per-request SSR bypasses CDN caching.SSR sends fully-rendered HTML from the server. The browser displays content immediately while React hydrates in the background, making the UI interactive.
SSR vs SSG:
Hydration mismatch: If server-rendered HTML differs from what client React would render, React throws a hydration error. Common causes: Date.now(), Math.random(), browser-only APIs in render paths. Suppress with suppressHydrationWarning for known-safe mismatches.
React 18 streaming: renderToPipeableStream streams HTML to the browser progressively, enabling Suspense boundaries to stream in chunks. Improves TTFB for slow data.
https://patterns.dev/react/server-side-rendering