function bridgeRequestToRR
Since 0.1.0
bridgeRequestToRR(
createLoadContext: () => RouterLoadContext,
populateLoadContext?: PopulateLoadContext
): Promise<HandlerResult>

Bridges a kernel IRequestContext into a web Request, invokes the RR handler, and maps the resulting web Response back onto ctx.response.

Returns the HandlerResult for the route handler to return.

Parameters

The kernel request context

The React Router request handler

createLoadContext: () => RouterLoadContext

Factory for the per-request context provider

optional
populateLoadContext: PopulateLoadContext

Optional hook adding app values to the context

Return Type

Promise<HandlerResult>

The HandlerResult produced by writing the response back

Usage

import { bridgeRequestToRR } from "react-router-plugin/src/index.ts";