Closed nicoknoll closed 4 months ago
Can you send me a StackBlitz link? You can use this as a template: https://stackblitz.com/edit/modular-forms-solid?file=src/routes/login.tsx
Please make sure that the libraries you are using are up to date.
Thanks for the fast reply. I copied the content from the guide (https://modularforms.dev/solid/guides/typescript) into stackblitz and it shows the same typescript errors (it is running though): https://stackblitz.com/edit/modular-forms-solid-dkgdkw?file=src%2Fapp.tsx,src%2FLoginPage.tsx
Thank you very much! I will look into this issue. For now, here is a workaround: https://stackblitz.com/edit/modular-forms-solid-owzxu8?file=src%2Fapp.tsx,src%2FLoginPage.tsx
Nice, thanks a lot so far!
This is fixed now. Thanks!
Hi, I'm just trying to get typing working but somehow even the LoginForm typescript example leads to errors.
My main issue is getting typing for the
FormStore<FieldValues>
right. One of the issues Intellij gives me is that it always requires the second argument (Generic type 'FormStore' requires '2' type argument(s)
) which seems to be easy to fix. But even when this is fixed the fields "of" parameter always complains withType FormStore<LoginForm> is not assignable to type FormStore<TFieldValues, TResponseData>
as well as the children render methodType (field: any, props: any) => JSX.Element is not assignable to type <TFieldValues, TFieldName>(store: FieldStore<TFieldValues, TFieldName>, props: FieldElementProps<TFieldValues, TFieldName>) => JSX.Element
.Let me know if I can add any more information to reproduce this.