Skip to content

Commit 253d447

Browse files
committed
docs(react/getting-started): collapse React 16–18 section inside Expandable
1 parent 0355fc4 commit 253d447

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

docs/platforms/javascript/guides/react/getting-started.mdx

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
---
22
title: "Getting Started"
33
sidebar_order: 1
4-
description: "Learn how to set up and configure Sentry in your React application."
4+
description: "Learn how to get started with the extended functionality of the React SDK and Sentry."
55
---
66

77
<PlatformContent includePath="llm-rules-platform" />
88

9+
This guide covers the full getting started pocess for the React SDK and assumes you want to utilize Error Monitoring, Logs, Tracing and Spans, and Replays. For the basic quickstart, the [React Quickstart](/platforms/javascript/guides/react/) guide is a better starting point.
10+
911
<PlatformContent includePath="getting-started-prerequisites" />
1012

11-
<StepConnector>
13+
<StepConnector checkable>
1214

13-
## Step 1: Install
15+
## Install
1416

1517
Run the command for your preferred package manager to add the Sentry SDK to your application:
1618

@@ -22,7 +24,7 @@ npm install @sentry/react --save
2224

2325
<PlatformContent includePath="getting-started-sourcemaps-short-version" />
2426

25-
## Step 2: Configure
27+
## Configure
2628

2729
### Initialize the Sentry SDK
2830

@@ -96,7 +98,7 @@ const root = createRoot(container);
9698
root.render(<App />);
9799
```
98100

99-
## Step 3: Capture React Errors
101+
## Capture React Errors
100102

101103
To make sure Sentry captures all your app's errors, configure error handling based on your React version.
102104

@@ -122,6 +124,8 @@ const root = createRoot(container, {
122124
root.render(<App />);
123125
```
124126

127+
<Expandable title="React 16–18">
128+
125129
### React 16 - 18
126130

127131
Use the Sentry Error Boundary to wrap your application:
@@ -141,7 +145,9 @@ import * as Sentry from "@sentry/react";
141145
[here](features/error-boundary/#manually-capturing-errors).
142146
</Alert>
143147

144-
## Step 4: Sending Logs
148+
</Expandable>
149+
150+
## Sending Logs
145151

146152
[Structured logging](/platforms/javascript/guides/react/logs/) lets users send text-based log information from their applications to Sentry. Once in Sentry, these logs can be viewed alongside relevant errors, searched by text-string, or searched using their individual attributes.
147153

@@ -171,7 +177,7 @@ logger.warn(logger.fmt`Rate limit exceeded for user: ${userId}`);
171177

172178
<Break />
173179

174-
## Step 5: Customizing Replays
180+
## (Optional) Customizing Replays
175181

176182
[Replays](/product/explore/session-replay/web/getting-started/) allow you to see video-like reproductions of user sessions.
177183

@@ -205,7 +211,7 @@ Sentry.init({
205211

206212

207213

208-
## Step 6: Custom Traces with Attributes
214+
## (Optional) Custom Traces with Attributes
209215

210216
[Tracing](/platforms/javascript/guides/react/tracing/) allows you to monitor interactions between multiple services or applications. Create custom spans to measure specific operations and add meaningful attributes. This helps you understand performance bottlenecks and debug issues with detailed context.
211217

@@ -263,8 +269,6 @@ if (span) {
263269

264270
<PlatformContent includePath="getting-started-tunneling" />
265271

266-
</StepConnector>
267-
268272
## Verify Your Setup
269273

270274
Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
@@ -294,6 +298,8 @@ Now, head over to your project on [Sentry.io](https://sentry.io/) to view the co
294298

295299
<PlatformContent includePath="getting-started-verify-locate-data" />
296300

301+
</StepConnector>
302+
297303
## Next Steps
298304

299305
At this point, you should have integrated Sentry into your React application and should already be sending error and performance data to your Sentry project.

0 commit comments

Comments
 (0)