Skip to content

Commit

Permalink
docs: update map docs
Browse files Browse the repository at this point in the history
  • Loading branch information
airjp73 committed Jul 26, 2024
1 parent efffc42 commit 37530e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/docs-v2/app/routes/_docs.reference.field-array-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ The `FieldArrayApi` provides helpers for interacting with field arrays.

<Row>
<Col>
Maps over the items in the array and renders them.
Maps over the items in the array and return the results.
Your map function will receive the following arguments:

- `key`: A unique string key you can use as the `key` prop when rendering the list of items.
When you have your own key available (like the `id` of an item), it's recommended to use that instead.
- `item`: A [`FormApi`](/reference/form-api) scoped to that item in the array.
- `index`: The index of the item in the array.

This is most commonly used to render the items in the array,
but you can return anything you want from the map function.

</Col>

<Col>
Expand Down

0 comments on commit 37530e2

Please sign in to comment.