@@ -76,14 +76,14 @@ export const clientAction = async ({ request, devTools }: ClientActionFunctionAr
7676 ``` ts
7777 import type { ExtendedContext } from " react-router-devtools/context" ;
7878
79- declare module " react-router" {
80- interface LoaderFunctionArgs {
81- devTools: ExtendedContext
82- }
83- interface ActionFunctionArgs {
84- devTools: ExtendedContext
85- }
86- }
79+ declare module " react-router" {
80+ interface LoaderFunctionArgs {
81+ devTools: ExtendedContext
82+ }
83+ interface ActionFunctionArgs {
84+ devTools: ExtendedContext
85+ }
86+ }
8787 ```
8888</InfoAlert >
8989
@@ -121,8 +121,7 @@ const loader = async ({ request, devTools }: LoaderFunctionArgs) => {
121121 const tracing = devTools ?.tracing ;
122122 // this will be traced in the network tab of react-router-devtools
123123 const user = tracing ?.trace (" my-event" ,() => getUser ())
124-
125- return { user }
124+ return { user }
126125}
127126```
128127
@@ -147,7 +146,7 @@ export const loader = async ({ request, devTools }: LoaderFunctionArgs) => {
147146 const startTime = tracing ?.start (" my-event" )
148147 // do something here, eg DB call
149148
150- // End the trace
149+ // End the trace
151150 tracing ?.end (" my-event" , startTime ! )
152151 return " data"
153152}
@@ -177,8 +176,8 @@ export const loader = async ({ request, devTools }: LoaderFunctionArgs) => {
177176 // this will be traced in the network tab of react-router-devtools
178177 const startTime = tracing ?.start (" get user" )
179178 // do something here, eg DB call
180- const user = await getUser ();
181- // End the trace
179+ const user = await getUser ();
180+ // End the trace
182181 tracing ?.end (" get user" , startTime ! , { user })
183182 return " data"
184183
0 commit comments