> For the complete documentation index, see [llms.txt](https://minwork.gitbook.io/long-press-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/long-press-hook/advanced/callback.md).

# Callback

> *useLongPress(**callback** \[, options]): bindFn*

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

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

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

For more info about callback structure and it's parameters see [callbacks](/long-press-hook/advanced/options/callbacks.md).
