-
Notifications
You must be signed in to change notification settings - Fork 49.6k
[DevTools] Recommend React Performance tracks if supported when Timeline profiler is not supported #34684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
if (supportsPerformanceTracks) { | ||
profilingFlags |= PROFILING_FLAG_PERFORMANCE_TRACKS_SUPPORT; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably best to always set that and have a dedicated message for when you have a prod build with performance tracks and click on the timeline profiler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, should recommend configuring the profiling build with a link.
<code className={styles.Code}>react-dom@{'>='}18</code>. React 19.2 | ||
and above must use{' '} | ||
<a | ||
className={styles.Link} | ||
href="https://react.dev/reference/dev-tools/react-performance-tracks" | ||
rel="noopener noreferrer" | ||
target="_blank"> | ||
React Performance tracks | ||
</a>{' '} | ||
instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- i'd replace "must" with "can"
- would wrap the "react 19.2 ..." message to a new line
- maybe say something about deprecating this and removing in a future release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we'll remove it since you can still use it with React 18 which doesn't have performance tracks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrapped the message and adjusted wording to "In React 19.2 and above React Performance tracks can be used."
f03175a
to
559bfea
Compare
Stacked on #34682
Maybe also add a nudge to use the tracks in the flamegraph and ranked sub-tabs of the React Profiler tab?
New message for current versions:
New message for older versions: