How to type the methods of useRemixForm() when passing to a child component? #133
Unanswered
AndresDJonge
asked this question in
Q&A
Replies: 2 comments
-
|
Having the same problem here... seems like I cannot pass a generic type to |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Refs #142 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all! I've got an issue with TypeScript when I'm trying to pass the form to a child component. I remember I could do this without a problem with the regular react-hook-form but now I've got this problems. Let's take an example:
The TS Error I get is:
Types of property register are incompatible. Type '(name: "action" | "email" | "password", options?: (RegisterOptions<{ action: Action; email: string; password: string; }> & { disableProgressiveEnhancement?: boolean | undefined; }) | undefined) => { ...; }' is not assignable to type '(name: string, options?: (RegisterOptions<FieldValues> & { disableProgressiveEnhancement?: boolean | undefined; }) | undefined) => { defaultValue?: string | undefined; ... 11 more ...; disabled?: boolean | undefined; }'. Types of parameters name and name are incompatible. Type string is not assignable to type 'action' | 'email' | 'password'Beta Was this translation helpful? Give feedback.
All reactions