Skip to content

Commit 1cba075

Browse files
authored
fix(react): Fix react tracing example (#13152)
1 parent 263cc3f commit 1cba075

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

platform-includes/performance/configure-sample-rate/javascript.react.mdx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
```javascript
2-
import { createBrowserRouter } from "react-router-dom";
32
import * as Sentry from "@sentry/react";
43

54
Sentry.init({
@@ -14,13 +13,6 @@ Sentry.init({
1413
// Or, if you are using react router, use the appropriate integration
1514
// See docs for support for different versions of react router
1615
// https://docs.sentry.io/platforms/javascript/guides/react/configuration/integrations/react-router/
17-
Sentry.reactRouterV6BrowserTracingIntegration({
18-
useEffect: React.useEffect,
19-
useLocation,
20-
useNavigationType,
21-
createRoutesFromChildren,
22-
matchRoutes,
23-
}),
2416
],
2517

2618
// For finer control of sent transactions you can adjust this value, or
@@ -31,3 +23,8 @@ Sentry.init({
3123
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
3224
});
3325
```
26+
27+
<Alert>
28+
See [React Router](/platforms/javascript/guides/react/features/react-router/)
29+
for more information on how to configure tracing with React Router.
30+
</Alert>

0 commit comments

Comments
 (0)