documentation: Smart form component form documentation not working
The smart form component from the documentation is not working: https://codesandbox.io/s/react-hook-form-smart-form-component-eqb3n
In the Form it does not like ...methods. It yields object is not a function.
Also; how do you write the Form component in typescript? It does not accept props on child object.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (9 by maintainers)
I was able to make use of the smart form in TypeScript using this, the usage is as follows: Input (I’m using a UI Component library for this)
Form setup (passing in the generic gives Type safety for defaultValues)
I’m not too experienced with TypeScript so input is welcome 😃
Yeh I figured. It would also be pretty cool to embed validation rules into the setup. I guess it could go into either the Form as props or the individual UI components.
And thanks a bunch for a great library (and extremely quick response)