Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix rendering while updating in FormSpy and useFormState #965

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

Open
zhujinxuan wants to merge 1 commit into final-form:main
base: main
Choose a base branch
Loading
from zhujinxuan:fix-FormSpy

Conversation

@zhujinxuan
Copy link

@zhujinxuan zhujinxuan commented Dec 18, 2021

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.

rodilo and SammyM reacted with thumbs up emoji
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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

FormSpy - Cannot update a component while rendering a different component

1 participant

AltStyle によって変換されたページ (->オリジナル) /