facebook / react

The library for web and native user interfaces.
https://react.dev
MIT License
229.83k stars 47.06k forks source link

[DevTools Bug]: React Profiler reports higher hook numbers than shown in Components #28584

Open iamakulov opened 8 months ago

iamakulov commented 8 months ago

Website or app

https://github.com/3perf/react-workshop-fwdays-mar24

Repro steps

Sorry for not having a minimal repro! I was only able to reproduce this in big apps like the one attached. However, it reproduces reliably.

How often does this bug happen?

Every time

DevTools package (automated)

No response

DevTools version (automated)

No response

Error message (automated)

No response

Error call stack (automated)

No response

Error component stack (automated)

No response

GitHub query string (automated)

No response

eps1lon commented 8 months ago

Thank you for the detailed repro instructions. I can also reproduce this as instructed.

I have a test reproducing the issue in https://github.com/facebook/react/pull/28587 that basically just inline all 3rd party dependencies. I haven't started further reducing the repro until it no longer reproduces but this should be a good starting point if somebody wants to dig into this.

standbyoneself commented 8 months ago

Same issue. Any thoughts on this?

sarmadka commented 5 months ago

Any update on this? How is this not treated as a high priority bug anyway?

standbyoneself commented 4 months ago

It's really very annoying to debug component without correct profiler work. Is anybody alive here? Do you need reproduction? Or what?

rnnc commented 3 months ago

this is such an annoying bug, this has existed for nearly half a decade; but the people working on this are more obsessed with useless things like server components

xaroth8088 commented 1 month ago

Issue is still present in 6.0.1 (10/15/2024)