[DevTools Bug]: useEffect hook incorrectly labelled as reason for component rendering #24182
Labels
Component: Developer Tools
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
Type: Bug
Website or app
https://codesandbox.io/s/react-devtools-useeffect-incorrect-render-reason-x3inwg
Repro steps
It is incorrect to say that hook 2 is why this rendered. Hook 1 is why it rendered. Hook 2 was rescheduled during that render. These really need to be separated as they are completely different things. In a component with a lot of effects it can be tedious to find which hook was the one that caused it to render (especially with transpilling, minifying etc where hooks are not always shown nicely).
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
The text was updated successfully, but these errors were encountered: