method ISsrService.render
Since 0.1.0
ISsrService.render(ctx: IRequestContext): Promise<HandlerResult>

Renders an SSR document for the given request context.

Bridges the kernel IRequestContext into a web-standard Request, invokes the React Router request handler, maps the resulting web Response back onto ctx.response (status, headers, body), and returns the HandlerResult the route handler should return.

Parameters

The current kernel request context

Return Type

Promise<HandlerResult>

A promise that resolves to the handler result

Usage

import { type ISsrService } from "common/src/index.ts";