Skip to content

Commit 16526b3

Browse files
committed
Update React Performance Tracks content
1 parent 2da4f7f commit 16526b3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/content/reference/dev-tools/react-performance-tracks.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ React Performance tracks are specialized custom entries that appear on the Perfo
1010

1111
These tracks are designed to provide developers with comprehensive insights into their React application's performance by visualizing React-specific events and metrics alongside other critical data sources such as network requests, JavaScript execution, and event loop activity, all synchronized on a unified timeline within the Performance panel for a complete understanding of application behavior.
1212

13-
<div style={{display: 'flex', justifyContent: 'center', marginBottom: '1rem'}}>
13+
<div className="flex justify-center mb-4">
1414
<img className="w-full light-image" src="/images/docs/performance-tracks/overview.png" alt="React Performance Tracks" />
1515
<img className="w-full dark-image" src="/images/docs/performance-tracks/overview.dark.png" alt="React Performance Tracks" />
1616
</div>
@@ -55,7 +55,7 @@ The Scheduler is an internal React concept used for managing tasks with differen
5555
- **Suspense** - Work related to Suspense boundaries, such as displaying fallbacks or revealing content.
5656
- **Idle** - The lowest priority work that is done when there are no other tasks with higher priority.
5757

58-
<div style={{display: 'flex', justifyContent: 'center', marginBottom: '1rem'}}>
58+
<div className="flex justify-center mb-4">
5959
<img className="w-full light-image" src="/images/docs/performance-tracks/scheduler.png" alt="Scheduler track" />
6060
<img className="w-full dark-image" src="/images/docs/performance-tracks/scheduler.dark.png" alt="Scheduler track" />
6161
</div>
@@ -69,7 +69,7 @@ Every render pass consists of multiple phases that you can see on a timeline:
6969
- **Commit** - After rendering components, React will submit the changes to the DOM and run layout effects, like [`useLayoutEffect`](/reference/react/useLayoutEffect).
7070
- **Remaining Effects** - React runs passive effects of a rendered subtree. This usually happens after the paint, and this is when React runs hooks like [`useEffect`](/reference/react/useEffect). One known exception is user interactions, like clicks, or other discrete events. In this scenario, this phase could run before the paint.
7171

72-
<div style={{display: 'flex', justifyContent: 'center', marginBottom: '1rem'}}>
72+
<div className="flex justify-center mb-4">
7373
<img className="w-full light-image" src="/images/docs/performance-tracks/scheduler-update.png" alt="Scheduler track: updates" />
7474
<img className="w-full dark-image" src="/images/docs/performance-tracks/scheduler-update.dark.png" alt="Scheduler track: updates" />
7575
</div>
@@ -82,7 +82,7 @@ Cascading updates is one of the patterns for performance regressions. If an upda
8282

8383
In development builds, React can show you which Component scheduled a new update. This includes both general updates and cascading ones. You can see the enhanced stack trace by clicking on the "Cascading update" entry, which should also display the name of the method that scheduled an update.
8484

85-
<div style={{display: 'flex', justifyContent: 'center', marginBottom: '1rem'}}>
85+
<div className="flex justify-center mb-4">
8686
<img className="w-full light-image" src="/images/docs/performance-tracks/scheduler-cascading-update.png" alt="Scheduler track: cascading updates" />
8787
<img className="w-full dark-image" src="/images/docs/performance-tracks/scheduler-cascading-update.dark.png" alt="Scheduler track: cascading updates" />
8888
</div>
@@ -93,14 +93,14 @@ In development builds, React can show you which Component scheduled a new update
9393

9494
The Components track visualizes the durations of React components. They are displayed as a flamegraph, where each entry represents the duration of the corresponding component render and all its descendant children components.
9595

96-
<div style={{display: 'flex', justifyContent: 'center', marginBottom: '1rem'}}>
96+
<div className="flex justify-center mb-4">
9797
<img className="w-full light-image" src="/images/docs/performance-tracks/components-render.png" alt="Components track: render durations" />
9898
<img className="w-full dark-image" src="/images/docs/performance-tracks/components-render.dark.png" alt="Components track: render durations" />
9999
</div>
100100

101101
Similar to render durations, effect durations are also represented as a flamegraph, but with a different color scheme that aligns with the corresponding phase on the Scheduler track.
102102

103-
<div style={{display: 'flex', justifyContent: 'center', marginBottom: '1rem'}}>
103+
<div className="flex justify-center mb-4">
104104
<img className="w-full light-image" src="/images/docs/performance-tracks/components-effects.png" alt="Components track: effects durations" />
105105
<img className="w-full dark-image" src="/images/docs/performance-tracks/components-effects.dark.png" alt="Components track: effects durations" />
106106
</div>
@@ -124,14 +124,14 @@ Additional events may be displayed during the render and effects phases:
124124

125125
In development builds, when you click on a component render entry, you can inspect potential changes in props. You can use this information to identify unnecessary renders.
126126

127-
<div style={{display: 'flex', justifyContent: 'center', marginBottom: '1rem'}}>
127+
<div className="flex justify-center mb-4">
128128
<img className="w-full light-image" src="/images/docs/performance-tracks/changed-props.png" alt="Components track: changed props" />
129129
<img className="w-full dark-image" src="/images/docs/performance-tracks/changed-props.dark.png" alt="Components track: changed props" />
130130
</div>
131131

132132
### Server {/*server*/}
133133

134-
<div style={{display: 'flex', justifyContent: 'center', marginBottom: '1rem'}}>
134+
<div className="flex justify-center mb-4">
135135
<img className="w-full light-image" src="/images/docs/performance-tracks/server-overview.png" alt="React Server Performance Tracks" />
136136
<img className="w-full dark-image" src="/images/docs/performance-tracks/server-overview.dark.png" alt="React Server Performance Tracks" />
137137
</div>

0 commit comments

Comments
 (0)