I’m using the RichTreeView
component of MUI
, but when I hover a TreeItem
, it triggers a re-rendering.
I found the reason for the re-rendering through React DevTool.
It’s this hook:
How should I check the value of the hook before and after it changes?
Then I was able to figure out why the mouse-in behavior triggered a re-render.