Skip to content

Commit 5132677

Browse files
committed
pattern
1 parent 72067f6 commit 5132677

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/react-router/lib/types/route-data.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ export type ClientDataFunctionArgs<Params> = {
9292
* }
9393
**/
9494
params: Params;
95+
/**
96+
* Matched un-interpolated route pattern for the current path (i.e., /blog/:slug).
97+
* Mostly useful as a identifier to aggregate on for logging/tracing/etc.
98+
*/
99+
pattern: string;
95100
/**
96101
* When `future.v8_middleware` is not enabled, this is undefined.
97102
*
@@ -121,6 +126,11 @@ export type ServerDataFunctionArgs<Params> = {
121126
* }
122127
**/
123128
params: Params;
129+
/**
130+
* Matched un-interpolated route pattern for the current path (i.e., /blog/:slug).
131+
* Mostly useful as a identifier to aggregate on for logging/tracing/etc.
132+
*/
133+
pattern: string;
124134
/**
125135
* Without `future.v8_middleware` enabled, this is the context passed in
126136
* to your server adapter's `getLoadContext` function. It's a way to bridge the

0 commit comments

Comments
 (0)