createLoadContextFactory(rr: Record<string, unknown>): () => RouterLoadContext
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.
() => RouterLoadContext
A factory constructing a fresh, empty provider per request