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

# Function: useGlobalPropsChanged()

> **useGlobalPropsChanged**(`callback`: (`data`: [`GlobalProps`](/next/zh/api/react/Types/GlobalProps.md)) => `void`): `void`

用于在 `__globalProps` 变化时获得通知的 React Hook。

## Parameters

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

## Returns

`void`

## Example

```ts
function App() {
  useGlobalPropsChanged((data) => {
    lynx.__globalProps.someProperty // can use lynx.__globalProps
    data.someProperty // can use data
  })
}
```
