react-swipe-hook
A hook for running callbacks on swipe
Api
Params
minimumDistance
onSwipeUp
onSwipeRight
onSwipeDown
onSwipeLeft
Returns
Array of onTouchStart
and onTouchEnd
event handlers.
Example usage
const ExampleComp = const output setOutput = const onTouchStart onTouchEnd = return <> <div ="swipe-area" = = /> <div ="test-output">output</div> </>