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

perf(react-form): skip updating isValidating by default #1291

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MVaik
Copy link

@MVaik MVaik commented Mar 16, 2025

fixes #1130

BREAKING CHANGE: isValidating is now opt-in

BREAKING CHANGE: isValidating is now opt-in
@MVaik
Copy link
Author

MVaik commented Mar 16, 2025

Unsure if this is even the right direction, as it's essentially flipping an established default purely for react performance.
Alternative could be to make disabling it opt-in instead?
Would mean adding the option to every React field if you care to.

@MVaik MVaik marked this pull request as draft March 16, 2025 19:06
Copy link
Author

@MVaik MVaik Mar 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"should properly update conditionally rendered fields" is now failing after this change, the "hello" that is written into firstField somehow ends up in secondField after the checkbox is toggled and firstField is no longer shown. This turns secondField into "helloworld" instead of "world".

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.

Fields re-render twice on each keystroke, based on validation state
1 participant