Re:Show HN: React Hook Form – Simple Form Validation
by bluebill1049 on Wednesday October 09, 2019 @08:17AM
(#21202429)
I agree. the lib itself is primitive enough for you to build a JSON formate to generate forms. here is an good example: https://github.com/start-at-root/react-breeze-form
A plain data format (like JSON) should be used to generate Forms, so your client/server side validation is always in sync (DRY).
But this isn't mutually exclusive. You could use this component and generate the implementation (or just plainly transform your data into this with a function). Especially since it leans very heavily on the HTML standard, which has several advantages.
Having a look at the code examples and documentation it would seem ergonomic to just feed JSON into a component that uses this.