react
react copied to clipboard
[DevTools] Show which hooks (names) changed in the Profiler
Hooks are the preferred way for writing stateful React components, but there are a few things about them that still lag behind the class component API: profiling (since DevTools just shows “hooks changed” rather than which ones changed).
Building on top of the initial named hooks release and the experimental enableProfilerChangedHookIndices feature flag, the Profiler should show the “names” of hooks that changed between renders. (Because this would be expensive to eagerly calculate, we would need to add a post-processing phase to the profiler, like Chrome has, where we loaded and parsed names1.)
Note that this issue will also resolve #16477.
1 We may only want to do this for components that are still mounted in the Fiber tree.
You're welcome to take a pass at this, @Fahme.
It's a pretty large task and it would need to be self-guided (minimal support from me), but if you're interested- that's awesome.
You're welcome to take a pass at this, @Fahme.
It's a pretty large task and it would need to be self-guided (minimal support from me), but if you're interested- that's awesome.
I've actually commented before going through the previous discussions and the challenges you guys were facing to get this to work so i took my comment out before your reply.
Anyways It would be a really nice feature to have i'll give it a shot and see if i can tackle it.
Sounds good. Keep me posted!
Super excited for this, godspeed @Fahme!
Any updates on this?
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!
bump
bump
There's no need to bump this. We know the feature would be useful. We just don't have the bandwidth for it.
@bvaughn if not bumped, looks like it will be automatically closed.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open
@arsinclair The stale comment only applies to issues not tagged as being opened by core team, which this one now has been. The bump from this morning didn't really do anything other than notify people on this thread.
Like @bvaughn said, I will also name my first child "React" if this gets implemented!