Building shadcn <Form> components for string arrays?
So I know it uses react-hook-form under the hood, but I'm struggling to figure out the best pattern for building the form for an array. Say I had a form schema like this:
I want to create multiple <Input /> components that should each correspond to a certain element in the "socials" array, but how would this work using shadcn <Form> components?
This doesn't work, it throws an error saying "expected array, received string"
3 Replies
Ahh so this is the only way, I was hoping there was a slightly less complex pattern but all good field arrays it is
form are complex