Edit this page.md

Features

In this section, you will find information about @lazarv/react-server features. The runtime provides a set of tools and utilities to build server-side rendered React applications.

You will learn how to use the CLI to build, run, and deploy your app. It's a very simple tool that provides a small set of commands to help you with your development workflow.

You will learn how to configure your app using the runtime's own configuration file and also using the Vite configuration file. @lazarv/react-server is built on top of Vite and you can use all the Vite configuration options and plugins to customize your app.

You can also access the full HTTP context during server-side rendering, middlewares, route handlers or server functions. The runtime provides a set of hooks and functions to access and manipulate the HTTP context.

The runtime also provides tools for you to cache data on the server. You can cache data in-memory by default, but you can also build your own cache provider.

The runtime encrypts all server function identifiers by default using AES-256-GCM. This prevents clients from discovering or calling server functions that were not explicitly exposed during rendering, keeping your server-side code secure without any extra configuration. Inbound server function payloads are also gated by configurable decode limits that cap memory, depth, and stream sizes before any of your server code runs — protecting against denial-of-service via crafted RSC replies.

For error handling, you can learn about how to use the built-in error boundary component and how to implement your own error handling strategy.

You can also learn about some small, but useful modes in this section, like partial pre-rendering, cluster mode or middleware mode. Partial pre-rendering is useful when you want to pre-render only parts of your app. Cluster mode is useful when you want to run your app in a multi-process environment. While middleware mode is useful when you want to run your app as a middleware in an existing server, like Express or NestJS.

You can learn about how to implement a micro-frontend architecture in the micro-frontends section. The runtime provides a set of tools to help you implement micro-frontends in your app. You can use the RemoteComponent component to load a micro-frontend from a remote URL and render it in your app using server-side rendering. Server-side rendering supported iframe fragments for React applications!

The runtime also provides Workers to offload heavy computations to separate threads using the "use worker" directive. On the server, worker functions run in Node.js Worker Threads, and on the client, they run in Web Workers — all with transparent RSC-based serialization. Workers can return plain values, React elements with Suspense, ReadableStreams, and deferred Promises.

Live Components allow you to create components that update in real-time without a full page reload. Using the "use live" directive, you can write async generator functions on the server that yield successive renders to the client — perfect for dashboards, chat applications, or any UI that needs streaming updates.

The runtime also supports MCP (Model Context Protocol), a structured way to expose server-side functions, tools, and resources to language models and other automated agents. You can define typed server functions that can be discovered, validated, and invoked through a standardized interface — making it easy to integrate AI tooling and automation.

For production readiness, the runtime includes built-in Observability via OpenTelemetry integration. When enabled, it automatically instruments HTTP requests, SSR rendering, server actions, and middleware with distributed traces and metrics — with zero overhead when disabled.

During development, you can enable the built-in DevTools panel to inspect your running application without leaving the browser. It covers server process health, RSC payload contents, cache behavior, the route tree, outlet layout, remote and live components, worker threads, and server logs — all in a dockable panel that stays out of the way until you need it.

See how @lazarv/react-server stacks up against Next.js, TanStack Start, React Router, and Waku in the comparison table.