# AsyncStatePattern

**Kind:** Interface

**Source:** [`atloria-monorepo/libs/parser-core/src/interfaces/state-management.interface.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/parser-core/src/interfaces/state-management.interface.ts#L266)

Async state pattern (for React Query, SWR, async Redux)

## Properties

| Property | Type |
|---|---|
| `states` | `{
    idle: boolean;
    loading: boolean;
    success: boolean;
    error: boolean;
  }` |
| `dataField` | `string` |
| `errorField` | `string` |
| `loadingField` | `string` |
| `queryKey` | `string` |
| `mutationFn` | `string` |
| `endpoint` | `string` |
| `hasRetry` | `boolean` |
| `hasOptimisticUpdate` | `boolean` |
