useForm submit "method" type #820
Unanswered
guihigashi
asked this question in
Help (React)
Replies: 0 comments
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.
-
I was writing a FormComponent in order to use it for both creating and editing a resource. So instead of destructure
post
andput
fromuseForm
, I gotsubmit
to call it with first parameter being the method as string. However, inInertiaFormProps
,submit
's type is(method: () => void, ...
. So I was wondering, why ismethod
typed as() => void
, instead ofstring
or evenget | post | put | patch | delete
?Beta Was this translation helpful? Give feedback.
All reactions