RSC Boundary

API reference

The primary integration is RscBoundaryProvider. Advanced setups can mount RscDevtools directly if needed.

 
import {
  RscBoundaryProvider,
  RscDevtools,
  RscServerBoundaryMarker,
  SERVER_BOUNDARY_DATA_ATTR,
} from "rsc-boundary";

RscBoundaryProvider

Server Component. Wrap children once at the root (e.g. app/layout.tsx).

PropTypeDescription
childrenReactNodeYour app tree.

Behavior

  • Development, default: children + floating devtools.
  • Production: children only; devtools are not mounted (no client chunk for the tool).

RscServerBoundaryMarker

Server Component. Optional wrapper that sets data-rsc-boundary-server so devtools list the subtree as an explicit server region with your label. Equivalent to putting the same data attribute on any host element yourself.

Constant SERVER_BOUNDARY_DATA_ATTR is data-rsc-boundary-server if you need it for docs or codegen.

RscDevtools

Client Component. Renders the pill, panel, and highlighting logic. Normally you do not import it; the provider includes it when appropriate. Export is available for custom layouts or non-standard wiring.

How it works — detection pipeline and limitations.