Skip to content

How to use strongly-typed formOptions? #1008

Answered by Balastrong
mfaux asked this question in Q&A
Discussion options

You must be logged in to vote

It's not something specific to formOptions/nextjs as it follows the same typings of useForm: if you specify the type and you have a validatorAdapter you should also specify that on the types.

formOptions<TaskFormData, ZodValidator> should do the trick :)

It should probably be explicitly mentioned in the adapters section in the docs, I'll take care of that.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mfaux
Comment options

Answer selected by Balastrong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants