router-core/ssr

Installation
SKILL.md

SSR (Server-Side Rendering)

WARNING: SSR APIs are experimental. They share internal implementations with TanStack Start and may change. TanStack Start is the recommended way to do SSR in production — use manual SSR setup only when integrating with an existing server.

CRITICAL: TanStack Router is CLIENT-FIRST. Loaders run on the client by default. With SSR enabled, loaders run on BOTH client AND server. They are NOT server-only like Remix/Next.js loaders. See router-core/data-loading.

CRITICAL: Do not generate Next.js patterns (getServerSideProps, App Router, server components) or Remix patterns (server-only loader exports). TanStack Router has its own SSR API.

Concepts

There are two SSR flavors:

  • Non-streaming: Full page rendered on server, sent as one HTML response, then hydrated on client.
  • Streaming: Critical first paint sent immediately; remaining content streamed incrementally as it resolves.

Key behaviors:

Installs
GitHub Stars
16
First Seen
router-core/ssr — lightfastai/lightfast