Skip to content
Discussion options

You must be logged in to vote

Yes, it changed, and it was a bug. It's fixed in 7.75.0.

7.55.0 merged _subjects.values into _subjects.state, and shouldRenderFormState had a size check that let any state emission reach a subscriber with the same number of subscribed keys:

Object.keys(formState).length >= Object.keys(_proxyFormState).length

handleSubmit emits three state updates and none of them carry a values key. { isSubmitting: true } is one key, useWatch subscribes with { values: true }, also one key, so 1 >= 1 passed with zero key overlap. #13398 put that branch behind isRoot, so only the root useForm subscriber gets it now.

Your repro, memo'd child, one click on Submit, child render count before and after:

7.54.2  …

Replies: 1 comment

Comment options

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