---
title: useFixedTick
description: "Runs a callback at a fixed interval."
---

```tsx
import { useFixedTick } from 'filedom';

useFixedTick(() => step(), 120, playing);
```

## Parameters

```ts
useFixedTick(
  callback: () => void,
  ms: number,
  enabled?: boolean
)
```

`callback`: tick handler. Each tick calls the latest closure, and a new closure does not restart the interval.

`ms`: interval in milliseconds. Changing it restarts the interval.

`enabled`: whether the timer runs. Default true. Set it to false to pause without unmounting.

## Returns

Nothing (`void`).
