Skip to content

Commit 310a83c

Browse files
committed
update section on error boundary
1 parent cef877a commit 310a83c

File tree

1 file changed

+8
-2
lines changed
  • docs/platforms/javascript/guides/react

1 file changed

+8
-2
lines changed

docs/platforms/javascript/guides/react/index.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Sentry supports multiple versions of React Router. To learn how to configure the
5454

5555
### Initialize the Sentry SDK
5656

57-
To import and initialize Sentry, create a file, for example, `instrument.js`, in your project and add the following code:
57+
To import and initialize Sentry, create a file in your project's root directory, for example, `instrument.js`, and add the following code:
5858

5959
```javascript {filename:instrument.js} {"onboardingOptions": {"performance": "3-8, 13-21, 24-30", "session-replay": "22, 33-39"}}
6060
import { useEffect } from "react";
@@ -142,7 +142,7 @@ root.render();
142142

143143
### Add Error Boundary Components (React \<19)
144144

145-
Use the [Error Boundary](features/error-boundary/) component to automatically send errors from specific component trees to Sentry and provide a fallback UI:
145+
Use the [`ErrorBoundary`](features/error-boundary/) component to automatically send errors from specific component trees to Sentry and provide a fallback UI:
146146

147147
```javascript
148148
import React from "react";
@@ -153,6 +153,12 @@ import * as Sentry from "@sentry/react";
153153
</Sentry.ErrorBoundary>;
154154
```
155155

156+
<Alert level="info">
157+
To capture errors manually with your own error boundary, use the
158+
`captureReactException` function as described
159+
[here](features/error-boundary/#manually-capturing-errors).
160+
</Alert>
161+
156162
<OnboardingOption optionId="performance">
157163
## Step 4: Set Up React Router
158164

0 commit comments

Comments
 (0)