The radius (in pixels) within which the touch event is considered inside. Must be greater than 0.
An object containing:
delta
: An object representing the distance moved in the x and y directions.isLeave
: A boolean indicating whether the touch event has left the specified radius.handleTouchStart
: A callback function to handle the start of a touch event.handleTouchMove
: A callback function to handle the movement of a touch event.handleTouchEnd
: A callback function to handle the end of a touch event.
A custom React hook for detecting if a touch event has left a specified radius.
Throws
Throws an error if the
radius
parameter is less than or equal to 0.Example