Setu-TS
    Preparing search index...

    Function createLoadContextFactory

    • Builds the per-request context factory from React Router's RouterContextProvider class.

      React Router 8 checks initialContext instanceof RouterContextProvider and answers a 500 Unexpected Server Error when it fails, so the class itself — not a structural stand-in — has to reach the handler.

      Extracted as a pure function so the branch is unit-testable without importing react-router.

      Parameters

      • rr: Record<string, unknown>

        The loaded react-router module namespace

      Returns () => RouterLoadContext

      A factory constructing a fresh, empty provider per request

      When the module exposes no RouterContextProvider export

      0.2.0