You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/react-router/lib/router/utils.ts
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -269,6 +269,11 @@ type DefaultContext = MiddlewareEnabled extends true
269
269
interfaceDataFunctionArgs<Context>{
270
270
/** A {@link https://developer.mozilla.org/en-US/docs/Web/API/Request Fetch Request instance} which you can use to read headers (like cookies, and {@link https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams URLSearchParams} from the request. */
271
271
request: Request;
272
+
/**
273
+
* Matched un-interpolated route pattern for the current path (i.e., /blog/:slug).
274
+
* Mostly useful as a identifier to aggregate on for logging/tracing/etc.
275
+
*/
276
+
pattern: string;
272
277
/**
273
278
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
274
279
* @example
@@ -1995,3 +2000,7 @@ export function isRouteErrorResponse(error: any): error is ErrorResponse {
0 commit comments