Closed marilari88 closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
zod-playground | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 21, 2024 10:06pm |
@giacomocerquone any chance you could take look at this?
@davc0n all concerns related to code formatting could be addressed in a dedicated PR in which we can try to review the prettier rules
I refactored the code by removing the form and moving the raw strings into a useState hook. The parsedSchema, parsedValues, and validationResults are now treated as derived states. This approach feels much clearer than before. Initially, I had concerns about performance, but I haven't experienced any issues during my tests. However, there is still room for performance optimization. We can achieve this by utilizing memoization or by breaking up the values state and moving it inside its validation component.