The per-request context object React Router passes to loaders, actions, and
middleware as context.
React Router 8 requires this to be a real RouterContextProvider instance —
it performs a nominal instanceof check in createRequestHandler and again
in the static handler whenever route middleware is used. A structurally
equivalent object is therefore NOT sufficient, which is why the instance is
always constructed by SsrRuntime.createLoadContext, sourced from
the same react-router module the request handler came from.
The per-request context object React Router passes to loaders, actions, and middleware as
context.React Router 8 requires this to be a real
RouterContextProviderinstance — it performs a nominalinstanceofcheck increateRequestHandlerand again in the static handler whenever route middleware is used. A structurally equivalent object is therefore NOT sufficient, which is why the instance is always constructed bySsrRuntime.createLoadContext, sourced from the samereact-routermodule the request handler came from.Since
0.2.0