-
Notifications
You must be signed in to change notification settings - Fork 49.6k
[Tracks]: display method name and component name for updates in DEV #34463
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
[Tracks]: display method name and component name for updates in DEV #34463
Conversation
|
Comparing: a9ad64c...21b4372 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
| export function startUpdateTimerByLane( | ||
| lane: Lane, | ||
| method: string, | ||
| componentName: string | null, |
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.
You could just accept a Fiber and call getComponentName in here instead. That way you have the option of doing it lazily too and don't have to repeat it.
We deal with Fibers here anyway. E.g. this is what startHostActionTimer already does.
2d49182 to
e6a43f5
Compare
e6a43f5 to
21b4372
Compare
…34463) For every "Update" entry we are going to add properties that will be displayed when the user clicks on that entry: name of the method that caused this first update and name of the component where this update happened. We could use the name of the component as a deeplink to React DevTools components panel in the future, once we support stable identificators on Fibers. <img width="1444" height="530" alt="Screenshot 2025-09-10 at 18 31 10" src="https://github.com/user-attachments/assets/7f9af037-2e7f-4e7b-9b7e-bf9f7d5a6e72" /> <img width="2088" height="530" alt="Screenshot 2025-09-10 at 18 24 21" src="https://github.com/user-attachments/assets/f557a173-bd9b-43f7-9333-74066f433ced" /> <img width="2088" height="530" alt="Screenshot 2025-09-10 at 18 26 04" src="https://github.com/user-attachments/assets/ff37d13f-bbe3-4f85-800e-81aa3aed7833" /> DiffTrain build for [0c813c5](0c813c5)
…34463) For every "Update" entry we are going to add properties that will be displayed when the user clicks on that entry: name of the method that caused this first update and name of the component where this update happened. We could use the name of the component as a deeplink to React DevTools components panel in the future, once we support stable identificators on Fibers. <img width="1444" height="530" alt="Screenshot 2025-09-10 at 18 31 10" src="https://github.com/user-attachments/assets/7f9af037-2e7f-4e7b-9b7e-bf9f7d5a6e72" /> <img width="2088" height="530" alt="Screenshot 2025-09-10 at 18 24 21" src="https://github.com/user-attachments/assets/f557a173-bd9b-43f7-9333-74066f433ced" /> <img width="2088" height="530" alt="Screenshot 2025-09-10 at 18 26 04" src="https://github.com/user-attachments/assets/ff37d13f-bbe3-4f85-800e-81aa3aed7833" /> DiffTrain build for [0c813c5](0c813c5)
|
Oh hell yes |
|
Something in here has broken how updates are logged. They don't show up for me at all. Or worse, I've been able to get them to overlap into two rows sometimes now. However that's so hard to repro I'm not sure if that was an existing issue. |
| blockingUpdateMethodName = method; | ||
| if (__DEV__ && fiber != null) { | ||
| blockingUpdateComponentName = getComponentNameFromFiber(fiber); | ||
| } |
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.
We should always set the component name even if it's null because otherwise we can show the wrong component name for the next call that is null.
For every "Update" entry we are going to add properties that will be displayed when the user clicks on that entry: name of the method that caused this first update and name of the component where this update happened.
We could use the name of the component as a deeplink to React DevTools components panel in the future, once we support stable identificators on Fibers.