Nested Array in useFieldArray #3702
-
Hello everyone. I just started using react hook form and trying to understand most of the things. I need to implement nested inputs and I am using useFieldArray api for that purpose. I have a parent component where i have my main form, 1st child component where i render one input field when the user clicks on the button. This is working fine. Now I have to render 2nd child component from 1st child component based the button click event. I am unable to render the 2nd child component on click of a button. I did not find any examples relevant to that. It would be great and really helpful if any of you could help me fix this. 1st child component looks like this
2nd child component
Looking forward for hints, solutions or ideas. Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 21 replies
-
can you share a codesanbox with it? |
Beta Was this translation helpful? Give feedback.
can you share a codesanbox with it?