> 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: useStateField()

> **useStateField**\<`T` = `unknown`>(`name`: `string`, `value?`: `T`): [`StateField`](/next/zh/api/genui/openui/core/interfaces/StateField.md)\<`InferStateFieldValue`\<`T`>>

基于表单状态和响应式绑定解析具名的 OpenUI 状态字段。

## Type Parameters

| Type Parameter | Default type |
| -------------- | ------------ |
| `T`            | `unknown`    |

## Parameters

| Parameter | Type     |
| --------- | -------- |
| `name`    | `string` |
| `value?`  | `T`      |

## Returns

[`StateField`](/next/zh/api/genui/openui/core/interfaces/StateField.md)\<`InferStateFieldValue`\<`T`>>
