We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
formAction
Whenever we return the formAction in an action:
export async function action({ request }: ActionArgs) { return formAction( // ...) } export default function() { const actionData = useActionData<typeof action>() // ^? any }
The useActionData loses the inference - it will be inferred as any.
useActionData
any
It'd be cool that it would infer the TypedResponse for us. The inferred type should probably be a union of:
TypedResponse
{ errors: FormErrors<SchemaType>, values: FormValues<SchemaType> } | UnpackData<typeof mutation>
Things to consider:
json
createFormAction
successPath
{ errors: FormErrors<SchemaType>, values: FormValues<SchemaType> }
The text was updated successfully, but these errors were encountered:
I'd be happy to pair on this one ;)
Sorry, something went wrong.
diogob
No branches or pull requests
Whenever we return the
formAction
in an action:The
useActionData
loses the inference - it will be inferred asany
.It'd be cool that it would infer the
TypedResponse
for us.The inferred type should probably be a union of:
Things to consider:
json
increateFormAction
we should be using the return of that given functionsuccessPath
in theformAction
the return type of the mutation should not be considered:The text was updated successfully, but these errors were encountered: