File tree 2 files changed +11
-7
lines changed
packages/react-router/lib/types
2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " react-router " : patch
3
+ ---
4
+
5
+ Fix ` ClientDataFunctionArgs ` ' ` context `
Original file line number Diff line number Diff line change @@ -141,14 +141,13 @@ type ClientDataFunctionArgs<T extends RouteInfo> = {
141
141
**/
142
142
params : T [ "params" ] ;
143
143
/**
144
- * When `future.unstable_middleware` is not enabled, this is undefined.
145
- *
146
- * When `future.unstable_middleware` is enabled, this is an instance of
147
- * `unstable_RouterContextProvider` and can be used to access context values
148
- * from your route middlewares. You may pass in initial context values in your
149
- * `<HydratedRouter unstable_getContext>` prop
144
+ * This is a `RouterContextProvider` instance generated from your router's
145
+ * `unstable_getContext` function and/or populated from route middleware
146
+ * functions.
150
147
*/
151
- context : unstable_RouterContextProvider ;
148
+ context : MiddlewareEnabled extends true
149
+ ? unstable_RouterContextProvider
150
+ : undefined ;
152
151
} ;
153
152
154
153
type ServerDataFunctionArgs < T extends RouteInfo > = {
You can’t perform that action at this time.
0 commit comments