• 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.

    Parameters

    • __namedParameters: PourProps

    Returns PourResponse

    handlers - gesture handlers for nozzle pouring

    Example

    const { handlers } = usePour({
    onPour: () => {
    console.log("Pouring started");
    },
    onPourCancel: () => {
    console.log("Pouring cancelled");
    },
    });

    <div {...handlers()} />

    See

    usePressGesture