Skip to content
Discussion options

You must be logged in to vote

This can be done using just values without useEffect. See this CodeSandbox. If values is initially undefined, you will need to provide defaultValues. See this CodeSandbox for an example that does not include defaultValues.

You're CodeSandbox is using a really old version of RHF (version 7.4.1 from 2021). The CodeSandboxes above use the latest version 7.71.2 and everything works as expected. When the server data is changed, the form updates to reflect the new values.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@helmax-y
Comment options

@BrendanC23
Comment options

Answer selected by helmax-y
@helmax-y
Comment options

@BrendanC23
Comment options

@helmax-y
Comment options

@BrendanC23
Comment options

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