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: docs/platforms/javascript/guides/react/features/react-router/v6-7.mdx
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,9 @@ sidebar_order: 20
5
5
---
6
6
7
7
<Alertlevel="info">
8
-
React Router v6 support is included in the `@sentry/react` package since version `7`.
9
-
React Router v7 support is included in the `@sentry/react` package since version `8.42.0`.
8
+
- React Router v6 support is included in the `@sentry/react` package since version `7`.
9
+
- React Router v7 support is included in the `@sentry/react` package since version `8.42.0`.
10
+
- React Router v7 in framework mode is not yet supported.
10
11
</Alert>
11
12
12
13
Update your `Sentry.browserTracingIntegration` to `Sentry.reactRouterV{6|7}BrowserTracingIntegration` and provide the required React hooks and router functions:
@@ -30,7 +31,7 @@ For React Router v6 this is available in `@sentry/react` version `7.21.0` and ab
30
31
If you choose to create your router instance with [`createBrowserRouter`](https://reactrouter.com/en/main/routers/create-browser-router) from the `react-router-dom` package, you can use `Sentry.wrapCreateBrowserRouterV{6|7}` to wrap it with the instrumentation:
31
32
32
33
33
-
```javascript {2-8, 15-21, 26-33} {tabTitle: v6}
34
+
```javascript {2-8, 15-21, 26-33} {tabTitle: Version 6}
```javascript {2-8, 15-21, 26-33} {tabTitle: Version 7}
68
69
importReactfrom"react";
69
70
import {
70
71
createBrowserRouter,
@@ -110,7 +111,7 @@ You can instrument [`createMemoryRouter`](https://reactrouter.com/en/main/router
110
111
If you're using the `<Routes />` component to define your routes, wrap [`Routes`](https://reactrouter.com/en/main/components/routes) using `Sentry.withSentryReactRouterV{6|7}Routing`. This creates a higher order component, which will enable Sentry to reach your router context. You can also use `Sentry.withSentryReactRouterV{6|7}Routing` for `Routes` inside `BrowserRouter`. `MemoryRouter`, and `HashRouter` components:
0 commit comments