# FieldArrayStore

> This document is the Markdown version of [formisch.dev/angular/api/FieldArrayStore/](https://formisch.dev/angular/api/FieldArrayStore/). For the complete documentation index, see [llms.txt](https://formisch.dev/llms.txt).

Field array store interface that provides reactive access to the state of an array field created with [`injectFieldArray`](/angular/api/injectFieldArray.md) or the [`*formischFieldArray`](/angular/api/formischFieldArray.md) directive.

## Generics

- `TSchema` `extends FormSchema`
- `TFieldArrayPath` `extends RequiredPath`

## Definition

- `FieldArrayStore`
  - `path` `ValidArrayPath<v.InferInput<TSchema>, TFieldArrayPath>`
  - `items` `Signal<string[]>`
  - `errors` `Signal<[string, ...string[]] | null>`
  - `isTouched` `Signal<boolean>`
  - `isEdited` `Signal<boolean>`
  - `isDirty` `Signal<boolean>`
  - `isValid` `Signal<boolean>`

### Explanation

The `items` signal contains a unique identifier for every item of the array. Use it as the `track` expression of your `@for` block: the identifiers are stable across reorders, so Angular moves the existing DOM instead of recreating it, and the state of each field stays attached to the right item.

The `errors` signal contains the validation errors of the array itself, for example from `v.nonEmpty()` or `v.maxLength()`, not the errors of the fields inside the array.
