nano-kit-react-ssr

Installation
SKILL.md

@nano_kit/react-ssr

@nano_kit/react-ssr renders a React app built on @nano_kit/react-router on the server with Vite: a plugin that builds client, renderer and server entries, a renderer that awaits page stores, collects head tags and cookies, and a client entry that hydrates. Routing is described in the nano-kit-react-router skill, stores and hydration in nano-kit-store.

Reference

DOCS.md next to this file is the documentation of the released packages as published on https://nano-kit.js.org, generated from the site sources. Read it for the plugin options, the renderer API, the client entry and the request-bound tokens before writing code. This skill adds only conventions, choices and pitfalls.

App shape

  • One index file exports routes and pages; the plugin, the renderer and the client entry all read it.
  • Every store is an injectable factory, never a module-level signal: one process serves many requests and each request gets its own InjectionContext.
  • Page and layout modules export Stores$ (the accessors the server must await and dehydrate) and Head$ next to the default component; layout and page factories are merged.
  • Select services that differ between browser and server with import.meta.env.SSR, and keep server-only code behind it.

Request flow

Installs
1
GitHub Stars
44
First Seen
Oct 27, 2026