profiling react component body

i'm using the react profiler to try to understand why a component is expensive to render. but large parts of the time aren't accounted for in the flame graph. i guess it's component logic, hooks, etc. what's the easiest/fastest way to understand what happened in the first 54.6ms here? am i stuck with performance.mark/measure?
No description
2 Replies
Mediocre
Mediocre9mo ago
You can go to the "components" tab and check what hook 10 is, and continue investigating from there. If you've tried that already or it doesn't really help then I'd suggest taking a good look at the component and seeing what could cause a re-render. I don't think there's any other way
cje
cjeOP9mo ago
hook 10 is causing the rerender in this case, but that's not what i'm trying to find out my question is, what's happening in the first 54ms i want it to render faster, not render less
Want results from more Discord servers?
Add your server