Open hyperg3g opened 5 months ago
Any setState call inside onCrosshairMove handler function causes Maximum update depth exceeded error
Even simple examples cause this problem:
const [time, setTime] = useState<MouseEventParams['time']>(undefined) const onCrosshairMove = (event: MouseEventParams<Time>) => setTime(event.time)
For now the only way I can handle it is by wrapping handler function with debounce with 0 delay
I can not reproduce https://codesandbox.io/s/codesandboxer-example-forked-ns9v5r. Could you give an example with the reproduction of the problem?
Any setState call inside onCrosshairMove handler function causes Maximum update depth exceeded error
Even simple examples cause this problem:
For now the only way I can handle it is by wrapping handler function with debounce with 0 delay