Skip to content
Discussion options

You must be logged in to vote
// new 'set' is created every time the EditForm renders
const set = studysets?.filter(el=>+el.id === +id)[0];

useEffect(() => {
  if (set) {
    // this runs when set is changed, which happens everytime EditForm renders
    reset(set);
  }
}, [set]);

This could be the cause of your problem. Still waiting for your CodeSandbox to confirm.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@nikgun1984
Comment options

@thanh-nguyen-95
Comment options

@nikgun1984
Comment options

@bluebill1049
Comment options

Answer selected by bluebill1049
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants