i create eventListener with
map.on('mousemove', (event) => handlerValues(event))
i must use event in handlerValues, but when i use
map.off('mousemove', (event) => handlerValues(event))it doesn't work
i wrapped handlerValues in useCallback, but nothing has changed
i find solution, that's crutch but you can use .filter on map._listeners.mousemove, and remove listener which you want delete