.md

API Reference

Every public export of @lazarv/react-server, grouped by subpath. Signatures, JSDoc descriptions, and examples are generated directly from the runtime's TypeScript definitions — what you read here mirrors what your editor shows on hover.

Within each page, symbols are sorted alphabetically inside their group (Functions, Constants, Classes, Interfaces, Types). Overloaded functions collapse into a single entry with all signatures listed.

Runtime

Core  ·  @lazarv/react-server
The core runtime entry point. HTTP context hooks, cookie helpers, caching utilities, and rendering controls.
Client  ·  @lazarv/react-server/client
Client and outlet contexts for navigation, refresh, and prefetching, plus the ClientOnly component for post-hydration code.
Router  ·  @lazarv/react-server/router
Typed routing primitives for the file-system and programmatic routers — route factories, schema validators, and param extractors.
Navigation  ·  @lazarv/react-server/navigation
<Link>, <Form>, <Refresh>, <ReactServerComponent>, navigation hooks and guards, redirect helpers, and scroll restoration.

Data, rendering, resiliency

Resources  ·  @lazarv/react-server/resources
createResource and createResources — typed server resources binding validated data loaders to routes.
Remote Components  ·  @lazarv/react-server/remote
Load a remote React component from another @lazarv/react-server deployment and render it server-side.
Error Boundary  ·  @lazarv/react-server/error-boundary
Error boundaries for server components — catch rendering errors, render fallbacks, surface info to observability.
Prerender  ·  @lazarv/react-server/prerender
Partial pre-rendering controls: usePrerender to mark a component for build-time rendering and the withPrerender HOC.

Caching

Memory Cache  ·  @lazarv/react-server/memory-cache
Default in-memory cache provider. useCache, invalidate, and client-side cache helpers.
Storage Cache  ·  @lazarv/react-server/storage-cache
Durable cache backend on unstorage — Redis, Cloudflare KV, Upstash, filesystem, and more.
RSC  ·  @lazarv/react-server/rsc
Low-level RSC serialization helpers — serialize and deserialize React server component payloads directly.

Advanced

Worker  ·  @lazarv/react-server/worker
Helpers for modules with the "use worker" directive — Node Worker Threads on the server, Web Workers on the client.
MCP  ·  @lazarv/react-server/mcp
Model Context Protocol primitives — typed tools, resources, and prompts exposed via an MCP server handler.
HTTP  ·  @lazarv/react-server/http
Low-level HTTP context types shared across middleware, route handlers, and server functions.

Config, build, deploy

Config  ·  @lazarv/react-server/config
Configuration schema and helpers — ReactServerConfig for typed react-server.config.mjs and generateJsonSchema.
Adapters  ·  @lazarv/react-server/adapters/*
Shared types and helpers for deploy adapters. The same surface is re-exported from every target.
Node  ·  @lazarv/react-server/node
Mount the runtime inside an existing Node.js server — Express, Fastify, NestJS, raw http. Used in middleware mode.
Dev  ·  @lazarv/react-server/dev
Programmatic entry point to the development server. Equivalent to running react-server without arguments.
Build  ·  @lazarv/react-server/build
Programmatic build entry point — useful for custom build pipelines. Equivalent to react-server build.

Observability & tooling

DevTools  ·  @lazarv/react-server/devtools
Configuration surface for the in-browser DevTools panel.
Telemetry  ·  @lazarv/react-server/telemetry
OpenTelemetry integration. Safe no-op when OpenTelemetry packages are not installed — import directly without guarding.

All content on these pages is auto-generated from the TypeScript definitions in packages/react-server/**/*.d.ts. Edit the JSDoc on the corresponding declaration to update the rendered output.