rhf-dynamic-field-arrays
Installation
SKILL.md
React Hook Form Dynamic Field Arrays
useFieldArray Hook
For forms with dynamic lists of inputs (team members, invoice items, etc.):
import { useForm, useFieldArray } from 'react-hook-form';
const { control } = useForm<FormData>();
const { fields, append, prepend, remove, insert, move } = useFieldArray({
control, // Required: control from useForm
name: 'items', // Required: name of array field
});