We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
RequestHandler
loadContext
1 parent 0519530 commit cd50dc6Copy full SHA for cd50dc6
.changeset/few-months-begin.md
@@ -0,0 +1,5 @@
1
+---
2
+"react-router": patch
3
4
+
5
+Fix `RequestHandler` `loadContext` parameter type when middleware is enabled
packages/react-router/lib/server-runtime/server.ts
@@ -41,7 +41,7 @@ import type { MiddlewareEnabled } from "../types/future";
41
export type RequestHandler = (
42
request: Request,
43
loadContext?: MiddlewareEnabled extends true
44
- ? unstable_RouterContextProvider
+ ? unstable_InitialContext
45
: AppLoadContext
46
) => Promise<Response>;
47
0 commit comments