Skip to content

issue: update from useFieldArray causes a different id being generated #10811

Answered by bluebill1049
iurietarlev asked this question in Q&A
Discussion options

You must be logged in to vote

Is there a strong technical reason why the id on fields change every time? Using keys in React helps prevent unnecessary re-renders usually, but having them changed all the time just leads to a complete re-render.

Yes, we need to unmount and remount the component to render the updated input value.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@milansav
Comment options

@Pipe-Runner
Comment options

Answer selected by leapful
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
4 participants
Converted from issue

This discussion was converted from issue #10782 on August 20, 2023 03:17.