Reactjs dev tool: hook number does not exist
Asked Answered
M

0

17

In order to understand why components are re-renders without apparent reason, I started the profiler. I can see that my component re-renders because of Hook 18:

enter image description here

So to understand what this mean, I tried to follow the advice in this question What does the hook numbers in the Reactjs Dev tool correspond to? that basically says that hooks are listed in the corresponding component tab. So I went there… but my hook is not listed here: the maximum hook is 15, not 18!

enter image description here

Any idea what I’m missing? I’m sure that I selected the right component as both times the same component is highlighted.

Mat answered 23/5, 2023 at 9:37 Comment(7)
Recently ran into this issue today too. Did they perhaps push a fault update to the React debugging tools?Screak
@ShreyGupta Oh interesting, we should try to fill a bug then. By any chance is your example simple enough to submit it right away?Mat
Unfortunately notScreak
Did you ever figure this out? I'm encountering the same issue.Jemima
@Jemima No… If you can get a simple enough MWE, you can fill a bug online and let us know.Mat
Did you fill an issue? Can you provide the link to it.Sublunar
No, I never took the time to extract a mirimal working exemple needed to create an issue. Feel free to do one.Mat

© 2022 - 2024 — McMap. All rights reserved.