Skip to content

Commit 559bfea

Browse files
committed
That learn more is too outdated for modern React
1 parent 406db5f commit 559bfea

File tree

1 file changed

+42
-37
lines changed

1 file changed

+42
-37
lines changed

packages/react-devtools-timeline/src/TimelineNotSupported.js

Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,51 +19,40 @@ type Props = {
1919
function PerformanceTracksSupported() {
2020
return (
2121
<>
22-
Please use{' '}
23-
<a
24-
className={styles.Link}
25-
href="https://react.dev/reference/dev-tools/react-performance-tracks"
26-
rel="noopener noreferrer"
27-
target="_blank">
28-
React Performance tracks
29-
</a>{' '}
30-
instead of the Timeline profiler.
22+
<p className={styles.Paragraph}>
23+
<span>
24+
Please use{' '}
25+
<a
26+
className={styles.Link}
27+
href="https://react.dev/reference/dev-tools/react-performance-tracks"
28+
rel="noopener noreferrer"
29+
target="_blank">
30+
React Performance tracks
31+
</a>{' '}
32+
instead of the Timeline profiler.
33+
</span>
34+
</p>
3135
</>
3236
);
3337
}
3438

3539
function UnknownUnsupportedReason() {
3640
return (
3741
<>
38-
Timeline profiler requires a development or profiling build of{' '}
39-
<code className={styles.Code}>react-dom@{'>='}18</code>. React 19.2 and
40-
above must use{' '}
41-
<a
42-
className={styles.Link}
43-
href="https://react.dev/reference/dev-tools/react-performance-tracks"
44-
rel="noopener noreferrer"
45-
target="_blank">
46-
React Performance tracks
47-
</a>{' '}
48-
instead.
49-
</>
50-
);
51-
}
52-
53-
export default function TimelineNotSupported({
54-
isPerformanceTracksSupported,
55-
}: Props): React.Node {
56-
return (
57-
<div className={styles.Column}>
58-
<div className={styles.Header}>Timeline profiling not supported.</div>
5942
<p className={styles.Paragraph}>
60-
<span>
61-
{isPerformanceTracksSupported ? (
62-
<PerformanceTracksSupported />
63-
) : (
64-
<UnknownUnsupportedReason />
65-
)}
66-
</span>
43+
Timeline profiler requires a development or profiling build of{' '}
44+
<code className={styles.Code}>react-dom@{'>='}18</code>.
45+
</p>
46+
<p className={styles.Paragraph}>
47+
In React 19.2 and above{' '}
48+
<a
49+
className={styles.Link}
50+
href="https://react.dev/reference/dev-tools/react-performance-tracks"
51+
rel="noopener noreferrer"
52+
target="_blank">
53+
React Performance tracks
54+
</a>{' '}
55+
can be used instead.
6756
</p>
6857
<div className={styles.LearnMoreRow}>
6958
Click{' '}
@@ -76,6 +65,22 @@ export default function TimelineNotSupported({
7665
</a>{' '}
7766
to learn more about profiling.
7867
</div>
68+
</>
69+
);
70+
}
71+
72+
export default function TimelineNotSupported({
73+
isPerformanceTracksSupported,
74+
}: Props): React.Node {
75+
return (
76+
<div className={styles.Column}>
77+
<div className={styles.Header}>Timeline profiling not supported.</div>
78+
79+
{isPerformanceTracksSupported ? (
80+
<PerformanceTracksSupported />
81+
) : (
82+
<UnknownUnsupportedReason />
83+
)}
7984

8085
{isInternalFacebookBuild && (
8186
<div className={styles.MetaGKRow}>

0 commit comments

Comments
 (0)