> For the complete documentation index, see [llms.txt](https://docs.haven1.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.haven1.org/build/developer-tools/haven1-sdk/haven1-wagmi-sdk/hook-module/usewatch.md).

# useWatch

## Function: useWatch()

> **useWatch**<`T`>(`hook`, `options`?): `WagmiHookReturnType`<`T`>

A custom hook that watches blockchain changes and triggers refetching logic based on specified criteria such as block number differences.

### Type Parameters

• **T** *extends* `object`

### Parameters

#### hook

`WagmiHookReturnType`<`T`>

The original hook provided by the Wagmi library with its data and methods.

#### options?

`UseWatchOptions`

Optional settings to configure the watching behavior, including whether to watch, block difference threshold, and chainId.

### Returns

`WagmiHookReturnType`<`T`>

Returns the original hook, preserving its functionality while adding watch-based refetching logic.

### Defined in

[packages/wagmi/src/hook/useWatch.tsx:46](https://github.com/haven1network/haven1-sdk/blob/df6267fec7b75040411529269f9c6a88e9c756ee/packages/wagmi/src/hook/useWatch.tsx#L46)
