Hook that encapsulates the logic for handling generic pouring.
The hook will return a number of gesture handlers that can be spread onto a DOM element. The hook will automatically detects if touch or mouse events are used.
handlers - gesture handlers for nozzle pouring
const { handlers } = usePour({ onPour: () => { console.log("Pouring started");},onPourCancel: () => { console.log("Pouring cancelled");},});<div {...handlers()} /> Copy
const { handlers } = usePour({ onPour: () => { console.log("Pouring started");},onPourCancel: () => { console.log("Pouring cancelled");},});<div {...handlers()} />
usePressGesture
Hook that encapsulates the logic for handling generic pouring.
The hook will return a number of gesture handlers that can be spread onto a DOM element. The hook will automatically detects if touch or mouse events are used.