// In component:
const { dragProps } = usePointerDrag({
onMove: ({ x, y }) => {
// Do something.
},
});
return <div {...dragProps()} />;
// In component:
const { dragProps } = usePointerDrag<{ clip: Clip }>({
onMove: ({ x, y, state: { clip } }) => {
// Do something.
},
});
return <div {...dragProps({ clip })} />;