Title: Support React Router v6 · Issue #4118 · getsentry/sentry-javascript · GitHub
Open Graph Title: Support React Router v6 · Issue #4118 · getsentry/sentry-javascript
X Title: Support React Router v6 · Issue #4118 · getsentry/sentry-javascript
Description: The reactRouterV#Instrumentation is no longer supported in React Router v6. Unlike previous versions of React Router, v6 does not expose the history object. I've attempted to solve this personally, so as to unblock myself in my projects:...
Open Graph Description: The reactRouterV#Instrumentation is no longer supported in React Router v6. Unlike previous versions of React Router, v6 does not expose the history object. I've attempted to solve this personally,...
X Description: The reactRouterV#Instrumentation is no longer supported in React Router v6. Unlike previous versions of React Router, v6 does not expose the history object. I've attempted to solve this persona...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/4118
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support React Router v6","articleBody":"The `reactRouterV#Instrumentation` is no longer supported in React Router v6. Unlike previous versions of React Router, v6 does not expose the `history` object.\r\n\r\nI've attempted to solve this personally, so as to unblock myself in my projects: [`react-router-v6-instrumentation` on NPM](https://www.npmjs.com/package/react-router-v6-instrumentation).\r\n\r\nExample usage:\r\n\r\n```jsx\r\nimport { init } from '@sentry/react';\r\nimport { render } from 'react-dom';\r\nimport { BrowserRouter } from 'react-router-dom';\r\nimport useBrowserTracing from 'react-router-v6-instrumentation';\r\n\r\nfunction App() {\r\n const browserTracing = useBrowserTracing();\r\n\r\n // Initialize Sentry with the browser tracing integration.\r\n useEffect(() => {\r\n init({\r\n integrations: [browserTracing],\r\n });\r\n }, [browserTracing]);\r\n\r\n return \u003c>Hello world!\u003c/>;\r\n}\r\n\r\nrender(\r\n \u003cBrowserRouter>\r\n \u003cApp />\r\n \u003c/BrowserRouter>,\r\n document.getElementById('root'),\r\n);\r\n```\r\n\r\n[Source code on GitHub](https://github.com/CharlesStover/react-router-v6-sentry-browser-tracing-integration)\r\n\r\nI hope this ticket inspires the maintainers to implement (credit? 😆) or unblocks others who are searching for solutions to this issue.\r\n","author":{"url":"https://github.com/quisido","@type":"Person","name":"quisido"},"datePublished":"2021-11-04T08:39:57Z","url":"https://github.com/getsentry/sentry-javascript/issues/4118"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:194db45c-db85-2101-f2ac-8860a0a63055 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 867E:2D58D9:966184:CB2A27:6B04DAF8 |
| html-safe-nonce | 4970dbe031cbcbe754b212b6c5684cd52023cd3a5d5b2eb720639d21b801e8db |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjdFOjJENThEOTo5NjYxODQ6Q0IyQTI3OjZCMDREQUY4IiwidmlzaXRvcl9pZCI6IjUzNTAwMTA5NjAxOTc1MDc4MzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4eec46b8a1a941396a3718a65a583e8625539c16d84ad66e98f6393eb889d912 |
| hovercard-subject-tag | issue:1044478431 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/4118/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9637244b07dc4a4122638936a43d4ca452b9caaad592727b4b04d3d2c0ea8cc2/getsentry/sentry-javascript/issues/4118 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9637244b07dc4a4122638936a43d4ca452b9caaad592727b4b04d3d2c0ea8cc2/getsentry/sentry-javascript/issues/4118 |
| og:image:alt | The reactRouterV#Instrumentation is no longer supported in React Router v6. Unlike previous versions of React Router, v6 does not expose the history object. I've attempted to solve this personally,... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | quisido |
| hostname | github.com |
| expected-hostname | github.com |
| None | 194dacb8acfd3e4d3ffb2704e0b1f10327f0dad690a7142acc7b0e0a2d073965 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6c35540a0a2991ee20bd053ba2601cce33f72cb1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width