Skip to content
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

[DevTools] Show which hooks (names) changed in the Profiler #21856

Open
bvaughn opened this issue Jul 12, 2021 · 12 comments
Open

[DevTools] Show which hooks (names) changed in the Profiler #21856

bvaughn opened this issue Jul 12, 2021 · 12 comments
Labels
Component: Developer Tools React Core Team Opened by a member of the React Core Team

Comments

@bvaughn
Copy link
Contributor

bvaughn commented Jul 12, 2021

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.

@bvaughn
Copy link
Contributor Author

bvaughn commented Jul 21, 2021

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.

@Fahme
Copy link

Fahme commented Jul 21, 2021

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.

@bvaughn
Copy link
Contributor Author

bvaughn commented Jul 21, 2021

Sounds good. Keep me posted!

@dustinlacewell
Copy link

Super excited for this, godspeed @Fahme!

@msalahz
Copy link

msalahz commented Oct 10, 2021

Any updates on this?

@stale

This comment has been minimized.

@stale stale bot added the Resolution: Stale Automatically closed due to inactivity label Jan 8, 2022
@arsinclair
Copy link

bump

@stale stale bot removed the Resolution: Stale Automatically closed due to inactivity label Jan 9, 2022
@bvaughn bvaughn added the React Core Team Opened by a member of the React Core Team label Jan 9, 2022
@piotrpawlik
Copy link

bump

@bvaughn
Copy link
Contributor Author

bvaughn commented Jan 26, 2022

There's no need to bump this. We know the feature would be useful. We just don't have the bandwidth for it.

@arsinclair
Copy link

@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

@bvaughn
Copy link
Contributor Author

bvaughn commented Jan 26, 2022

@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.

@dukeeagle
Copy link

Like @bvaughn said, I will also name my first child "React" if this gets implemented!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Developer Tools React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

No branches or pull requests

7 participants