# Callback

> *useDoubleTap(**callback** \[, threshold]* *\[, options]): bindObj*

Hook first parameter, *callback*, can be either function or `null` (if you want to disable the hook).

This allows you to dynamically control if event should be bound. For example:

```javascript
const bind = useDoubleTap(isMobile ? () => {
  console.log('Double tapped');
} : null);
```

It is recommended (althought not neccessary) to keep callback memoized using `useCallback` because it *will be* a direct dependency for memoized hook result.

```tsx
const callback = useCallback(..., [...]);
const bind = useDoubleTap(callback, ...);
```
