React's mouseEvent doesn't have offsetX/offsetY
Oh, well, I see.
I get it from e.nativeEvent.offsetX
. Is it right approach?
I have found that evt.nativeEvent.offsetX was causing me problems with my component flashing a lot and being sort of weird, I haven't fully debugged it, but I switched to using
React.createRef or React.useRef on the parent container, and then using event.clientX - ref.current.getBoundingClientRect().left and found this works better for me