React onMouseEnter event.currentTarget is always null
I am using React d3 tree with a custom node element. I am trying to show some text on hovering a node, but it only works the first time I hover over one, then the mouse.currentTarget seems to be null each time I hover a node, so documentation.show won’t be set to true.
The useMemo is used so that the whole component won’t rerender each time I hover over a node (because of documentation state change).