Skip to content

Commit

Permalink
Mention react-router instrumentation's HashRouter and `MemoryRouter…
Browse files Browse the repository at this point in the history
…` support. (#7426)

Co-authored-by: Abhijeet Prasad <[email protected]>
Co-authored-by: Liza Mock <[email protected]>
  • Loading branch information
3 people committed Jul 17, 2023
1 parent 1ad32d4 commit 6dd5cc5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ You can instrument [`createMemoryRouter`](https://reactrouter.com/en/main/router

### Usage With `<Routes />` Component

If you use the `<Routes />` component from `react-router-dom` to define your routes, wrap [`Routes`](https://reactrouter.com/docs/en/v6/api#routes-and-route) using `Sentry.withSentryReactRouterV6Routing`. This creates a higher order component, which will enable Sentry to reach your router context, as in the example below:
If you're using the `<Routes />` component from `react-router-dom` to define your routes, wrap [`Routes`](https://reactrouter.com/docs/en/v6/api#routes-and-route) using `Sentry.withSentryReactRouterV6Routing`. This creates a higher order component, which will enable Sentry to reach your router context. You can also use `Sentry.withSentryReactRouterV6Routing` for `Routes` inside `BrowserRouter`. `MemoryRouter`, and `HashRouter` components:

```javascript
import React from "react";
Expand Down

1 comment on commit 6dd5cc5

@vercel
Copy link

@vercel vercel bot commented on 6dd5cc5 Jul 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sentry-docs – ./

docs.sentry.io
sentry-docs.sentry.dev
sentry-docs-git-master.sentry.dev

Please sign in to comment.