Skip to content

Commit f7dc2e9

Browse files
committed
feat(react)!: Remove deprecated react router methods
1 parent edbb214 commit f7dc2e9

File tree

3 files changed

+4
-17
lines changed

3 files changed

+4
-17
lines changed

docs/migration/v8-to-v9.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ It will be removed in a future major version.
9292

9393
## 4. Removal of Deprecated APIs (TODO)
9494

95-
TODO
95+
### `@sentry/react`
96+
97+
- The `wrapUseRoutes` method has been removed. Use `wrapUseRoutesV6` or `wrapUseRoutesV7` instead depending on what version of react router you are using.
98+
- The `wrapCreateBrowserRouter` method has been removed. Use `wrapCreateBrowserRouterV6` or `wrapCreateBrowserRouterV7` depending on what version of react router you are using.
9699

97100
## 5. Build Changes
98101

packages/react/src/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ export {
1616
export {
1717
reactRouterV6BrowserTracingIntegration,
1818
withSentryReactRouterV6Routing,
19-
// eslint-disable-next-line deprecation/deprecation
20-
wrapUseRoutes,
2119
wrapUseRoutesV6,
22-
// eslint-disable-next-line deprecation/deprecation
23-
wrapCreateBrowserRouter,
2420
wrapCreateBrowserRouterV6,
2521
} from './reactrouterv6';
2622
export {

packages/react/src/reactrouterv6.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ export function wrapUseRoutesV6(origUseRoutes: UseRoutes): UseRoutes {
2727
return createV6CompatibleWrapUseRoutes(origUseRoutes, '6');
2828
}
2929

30-
/**
31-
* Alias for backwards compatibility
32-
* @deprecated Use `wrapUseRoutesV6` or `wrapUseRoutesV7` instead.
33-
*/
34-
export const wrapUseRoutes = wrapUseRoutesV6;
35-
3630
/**
3731
* A wrapper function that adds Sentry routing instrumentation to a React Router v6 createBrowserRouter function.
3832
* This is used to automatically capture route changes as transactions when using the createBrowserRouter API.
@@ -44,12 +38,6 @@ export function wrapCreateBrowserRouterV6<
4438
return createV6CompatibleWrapCreateBrowserRouter(createRouterFunction, '6');
4539
}
4640

47-
/**
48-
* Alias for backwards compatibility
49-
* @deprecated Use `wrapCreateBrowserRouterV6` or `wrapCreateBrowserRouterV7` instead.
50-
*/
51-
export const wrapCreateBrowserRouter = wrapCreateBrowserRouterV6;
52-
5341
/**
5442
* A higher-order component that adds Sentry routing instrumentation to a React Router v6 Route component.
5543
* This is used to automatically capture route changes as transactions.

0 commit comments

Comments
 (0)