Basics

Basic hook usage

import React from 'react';
import { useDoubleTap } from 'use-double-tap';

export const Example = () => {
    const bind = useDoubleTap((event) => {
      // Your action here
      console.log('Double tapped');
    });

    return <button {...bind}>Tap me</button>;
}

Last updated