Please add better typescript. #984
Unanswered
KC3NZO
asked this question in
Help (React)
Replies: 1 comment 2 replies
-
About Shared properties:You can declare your shared properties in a .d.ts Example: interface SharedProps extends PageProps {
auth: {
user: {
id: number,
name: string,
email: string
}
}
}
export type PageWithSharedProps = InertiaPage<SharedProps> and use it: const { auth } = usePage<PageWithSharedProps>().props About the UseForm methods:I could find progress, but cancel indeed appears to be missing. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
inertia has big problem and that is typescript. for example when I want to use share data in HandlerInertiaRequest in laravel I want to add some extra data and I can't declare typescript interfaces or types.
And big problem is PageProps interface with unknown for each key and value, I tried declare interface or but PageProps is not declaring.
Another problem is useForm hook in inertia react. some methods and properties like progress, cancel are not exists at all.
Sorry for my bad English I hope some one check this.
Beta Was this translation helpful? Give feedback.
All reactions