# async-state

- 分组：组合组件（Composite）
- 页面：/components/async-state
- 源码：packages/react/src/components/async-state.tsx

## 导出

```ts
import { AsyncState } from "@modra/react";
```

## Props（AsyncStateProps）

| 名称 | 必填 | 类型 | 说明 |
| --- | --- | --- | --- |
| `status` | 是 | `AsyncStateStatus` |  |
| `children` | 否 | `React.ReactNode` | Rendered when status is "ready". |
| `empty` | 否 | `EmptyProps \| React.ReactNode` | Props forwarded to the Empty primitive, or a full custom node. |
| `error` | 否 | `Omit<ResultProps, "status"> \| React.ReactNode` | Props forwarded to the Result primitive (status defaults to "error"), or a full custom node. |
| `minHeight` | 否 | `number \| string` | Minimum block height while loading/empty/error, so surrounding layout does not jump. |
