Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rendering while updating in FormSpy and useFormState #965

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zhujinxuan
Copy link

Fix #809

In this PR, I delay the first onChange call to the React.useEffect, I think it shall fix the problem of updating while rendering.

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5c125b9:

Sandbox Source
React Final Form - Simple Example Configuration
React Final Form - Synchronous Record Level Validation Configuration
React Final Form - Synchronous Field Level Validation Configuration
final-form/react-final-form Configuration
React Final Form - Subscriptions Example Configuration
react-final-form-formspy Issue #809

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FormSpy - Cannot update a component while rendering a different component
1 participant