import { useGesture } from '@use-gesture/react'
const bind = useGesture(
{
onDrag: (state) => doSomethingWith(state),
onDragStart: (state) => doSomethingWith(state),
onDragEnd: (state) => doSomethingWith(state),
onPinch: (state) => doSomethingWith(state),
onPinchStart: (state) => doSomethingWith(state),
onPinchEnd: (state) => doSomethingWith(state),
onScroll: (state) => doSomethingWith(state),
onScrollStart: (state) => doSomethingWith(state),
onScrollEnd: (state) => doSomethingWith(state),
onMove: (state) => doSomethingWith(state),
onMoveStart: (state) => doSomethingWith(state),
onMoveEnd: (state) => doSomethingWith(state),
onWheel: (state) => doSomethingWith(state),
onWheelStart: (state) => doSomethingWith(state),
onWheelEnd: (state) => doSomethingWith(state),
onHover: (state) => doSomethingWith(state)
},
config
)
return <div {...bind()} />