> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# Function: useInitDataChanged()

> **useInitDataChanged**(`callback`: (`data`: [`InitData`](/next/api/react/Types/InitData.md)) => `void`): `void`

A React Hooks for you to get notified when `initData` changed.

## Parameters

| Parameter  | Type                                                                |
| ---------- | ------------------------------------------------------------------- |
| `callback` | (`data`: [`InitData`](/next/api/react/Types/InitData.md)) => `void` |

## Returns

`void`

## Example

```ts
function App() {
  useInitDataChanged((data) => {
    data.someProperty // can use it
  })
}
```
