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-zod)!: merge parse into schema to streamline form setup #22

Merged
merged 2 commits into from
Aug 24, 2022

Conversation

edmundhung
Copy link
Owner

Context

This PR includes breaking changes

This is a follow-up from #21 as now none of our hooks accept the schema directly but instead expect individual pieces of what schema provided. There are 2 ways to handle this:

  1. Make 3 independent function that parse the schema and convert it to the corresponding structure we want.
  2. Generate all 3 things in 1 function.

Although (1) is good for reducing the size of the package (since parse might only be needed on BE and the constraint is optional), I don't like having to call so many functions again and again. This PR goes with option 2 instead.

@edmundhung edmundhung merged commit 6439789 into main Aug 24, 2022
@edmundhung edmundhung deleted the refine-zod-integration branch August 24, 2022 21:33
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.

1 participant