• Hook that encapsulates the logic for handling ingredient 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: IngredientPourProps

    Returns IngredientPourResponse

    handlers - gesture handlers for nozzle pouring

    Example

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

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

    See

    • IntentAware.performIntent
    • usePressGesture