> For the complete documentation index, see [llms.txt](https://minwork.gitbook.io/double-tap-hook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://minwork.gitbook.io/double-tap-hook/basics.md).

# Basics

```javascript
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>;
}
```
