useFieldArray: Why typescript doesn't support an array of primitive values, e.g array of strings? #12832
Unanswered
lucashfreitas
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The issue
Using
useFieldArray
with array of primitive values, e.g array of strings, will cause an type error on react hook form.This is a wide issue and was reported multiple other times, as seem:
Why?
Quite often we just need an array of string and not an array of objects. In fact if i "HACK" the type-system the form work flawless, as seem below. There is any particular reason why react hook form does not support primitive values on useFieldArray out of the box?
Beta Was this translation helpful? Give feedback.
All reactions