Core
useRepeater()

useRepeater

Provides functionality for managing and manipulating repeatable form fields within a form context.

Repeater State

name

string

Name of the fields collection

connect

Allow you to connect your repeater to a form.

initialValues

unknown[] | undefined

Allow you to pass some initial values to the form. If a collection field is mounted, it will lookup into this value to set his initial value. If you don't manually connect to a form you don't need to pass initialValues, there will be automatically set.

⚠️

In the case useRepeater is define at same level that form, you should pass connect and initialValues

Look example ↗ (opens in a new tab)