Skip to content

Commit 74822de

Browse files
authored
ref(react-router): Deprecate ErrorBoundary exports (#18208)
The ErrorBoundary exported in the SDK only works on the client and is not intended to be used. Use react router's error boundary instead: https://docs.sentry.io/platforms/javascript/guides/react-router/#report-errors-from-error-boundaries.
1 parent fcf35f6 commit 74822de

File tree

1 file changed

+12
-9
lines changed
  • packages/react-router/src/client

1 file changed

+12
-9
lines changed

packages/react-router/src/client/index.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ export * from '@sentry/browser';
33
export { init } from './sdk';
44
export { reactRouterTracingIntegration } from './tracingIntegration';
55

6-
export {
7-
captureReactException,
8-
reactErrorHandler,
9-
Profiler,
10-
withProfiler,
11-
useProfiler,
12-
ErrorBoundary,
13-
withErrorBoundary,
14-
} from '@sentry/react';
6+
export { captureReactException, reactErrorHandler, Profiler, withProfiler, useProfiler } from '@sentry/react';
7+
8+
/**
9+
* @deprecated ErrorBoundary is deprecated, use react router's error boundary instead.
10+
* See https://docs.sentry.io/platforms/javascript/guides/react-router/#report-errors-from-error-boundaries
11+
*/
12+
export { ErrorBoundary, withErrorBoundary } from '@sentry/react';
13+
14+
/**
15+
* @deprecated ErrorBoundaryProps and FallbackRender are deprecated, use react router's error boundary instead.
16+
* See https://docs.sentry.io/platforms/javascript/guides/react-router/#report-errors-from-error-boundaries
17+
*/
1518
export type { ErrorBoundaryProps, FallbackRender } from '@sentry/react';

0 commit comments

Comments
 (0)