JoviDeCroock/Hooked-Form

[question] using `useFieldArray` for flat array of strings?

stefanprobst opened this issue · 2 comments

hi, what is the recommended way to use useFieldArray for a flat array of strings, i.e. not { friends: [{ name: 'one' }, { name: 'two' }] } but { friends: ['one', 'two'] }?

from what i understand from the docs, useFieldArrayrequires an array of objects with an id property (which is also what react-hook-form and i believe formik do as well), but it is unclear to me how then to use useFieldArray with flat arrays? thanks!

great, thanks!