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

feat(conform-dom,conform-react,conform-yup,conform-zod)!: make internal state uncontrolled #39

Merged
merged 2 commits into from
Oct 3, 2022

Conversation

edmundhung
Copy link
Owner

@edmundhung edmundhung commented Oct 3, 2022

Context

This PR includes breaking changes

This is the first step for the upcoming server validation feature. It stops syncing error with useEffect whenever the reference for initialError is changed with the error object simplified to a name-message pair array (i.e. Array<[string, string]>). It also makes sure a stable reference for defaultValue.

The usage of the new error structure will be covered in another PR.

These values will not be refreshed unless a form reset event is captured.

@cloudflare-pages
Copy link

cloudflare-pages bot commented Oct 3, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: af8ab26
Status: ✅  Deploy successful!
Preview URL: https://d2be5062.conform.pages.dev
Branch Preview URL: https://uncontrolled-form.conform.pages.dev

View logs

@edmundhung edmundhung changed the title feat!: make internal state uncontrolled feat(conform-dom,conform-react,conform-yup,conform-zod)!: make internal state uncontrolled Oct 3, 2022
@edmundhung edmundhung merged commit 48dfbee into main Oct 3, 2022
@edmundhung edmundhung deleted the uncontrolled-form branch October 3, 2022 14:35
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.

None yet

1 participant