Skip to content
Discussion options

You must be logged in to vote

@lokeshk12510 : It seems you are misunderstanding re-rendering of React component with react-hook-form and also how highlight updates on React devtools works.

when looping from useFieldArray every input field under for loop will re-render, Ok then why this description field is re-rendering when adding a new row
=> Whenever the "fields" from "useFieldArray" changes (append, prepend, move, remove, ...), it will trigger a re-rendering on App.js (where hook "useFieldArray" is called) therefore your new <ControlledInput2 name="desc" control={control} /> also re-rendered. This is how React Functional component works with hooks.

Also, in our first comment, you said the native input field is not …

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@lokeshk12510
Comment options

Comment options

You must be logged in to vote
3 replies
@lokeshk12510
Comment options

@leapful
Comment options

leapful Sep 16, 2022
Collaborator

@lokeshk12510
Comment options

Comment options

You must be logged in to vote
1 reply
@1010nishant
Comment options

Answer selected by bluebill1049
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants