hunk.code_window:   async function handleLoad(location: Location, matches: ClientMatch[]) {
       abortNormalNavigation();
       let transition: TransitionStates["Loading"] = {
         state: "loading",
         type: "load",
         submission: undefined,
         location
       };
       update({ transition, nextMatches: matches });
       await loadPageData(location, matches);
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep keep
hunk.after_edit:       type: "normalLoad",
  
hunk.file_path: packages/remix-react/transition.ts
hunk.type: replace
file: import type {
    AppLoadContext,
    ServerBuild,
    ServerPlatform
  } from "@remix-run/server-runtime";
  import { createRequestHandler as createRemixRequestHandler } from "@remix-run/server-runtime";
  
  /**
   * A function that returns the value to use as `context` in route `loader` and
   * `action` functions.
   *
   * You can think of this as an escape hatch that allows you to pass
   * environment/platform-specific values through to your loader/action.
   */
  export interface GetLoadContextFunction {
    (event: FetchEvent): AppLoadContext;
  }
  
  export type RequestHandler = ReturnType<typeof createRequestHandler>;
  
  /**
   * Returns a request handler for Cloudflare runtime that serves the
   * response using Remix.
   */
  export function createRequestHandler({
    build,
    getLoadContext,
    mode
  }: {
    build: ServerBuild;
    getLoadContext?: GetLoadContextFunction;
    mode?: string;
  }) {
    let platform: ServerPlatform = {};
    let handleRequest = createRemixRequestHandler(build, platform, mode);
  
    return (event: FetchEvent) => {
      let loadContext =
        typeof getLoadContext === "function" ? getLoadContext(event) : undefined;
  
      return handleRequest(event.request, loadContext);
    };
  }
  