一个 StaticHandler 实例管理一个单一的 SSR 导航/fetch 事件

interface StaticHandler {
    dataRoutes: AgnosticDataRouteObject[];
    query(request: Request, opts?: {
        dataStrategy?: DataStrategyFunction;
        requestContext?: unknown;
        skipLoaderErrorBubbling?: boolean;
    }): Promise<Response | StaticHandlerContext>;
    queryRoute(request: Request, opts?: {
        dataStrategy?: DataStrategyFunction;
        requestContext?: unknown;
        routeId?: string;
    }): Promise<any>;
}

属性

dataRoutes: AgnosticDataRouteObject[]

方法