# FieldArray

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

Headless field array component that provides reactive properties and state for managing array fields. The field array component takes a form store, path to array field, and a render function that receives a field array store to manage array items and handle array operations.

```tsx
<FieldArray of={…} path={…}>children</FieldArray>
```

## Generics

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

## Properties

- `of` `FormStore<TSchema>`
- `path` `ValidArrayPath<v.InferInput<TSchema>, TFieldArrayPath>`
- `children` `(store: FieldArrayStore<TSchema, TFieldArrayPath>) => ReactElement`

### Explanation

The `FieldArray` component is a headless component that doesn't render any UI itself. Instead, it provides a render prop function via the `children` prop that receives a [`FieldArrayStore`](/react-native/api/FieldArrayStore.md) containing the reactive state of the array field, such as its item IDs and validation errors. The items themselves are manipulated with the form methods listed below.

The component automatically handles array field registration, validation, and state management through the `of` prop that references the form store.

## Related

### Hooks

[`useForm`](/react-native/api/useForm.md), [`useFieldArray`](/react-native/api/useFieldArray.md)

### Components

[`Field`](/react-native/api/Field.md)

### Methods

[`insert`](/methods/api/insert.md), [`move`](/methods/api/move.md), [`remove`](/methods/api/remove.md), [`replace`](/methods/api/replace.md), [`swap`](/methods/api/swap.md)
