Closed adaboese closed 1 year ago
I am not sure what's the problem here, but I am following the README.md.
import { z } from 'zod'; const FormDataZodSchema = z.object({ action: z.string(), outline: z.string().min(2, { message: 'Outline must be at least 2 characters.', }), }); type FormData = z.infer<typeof FormDataZodSchema>; const resolver = zodResolver(FormDataZodSchema); // ... const form = useRemixForm<FormData>({ defaultValues: { outline: articleProject.articleOutline ?? '', }, mode: 'onSubmit', resolver, }); useEffect(() => { if (generateOutlineFetcher.data?.outlineMarkdown) { form.setValue('outline', generateOutlineFetcher.data.outlineMarkdown); } }, [form, generateOutlineFetcher.data?.outlineMarkdown]); const actionIsPending = isGenerating; return ( <RemixFormProvider {...form}> <Form className={css({ display: 'flex', flexDir: 'column', gap: '8', })} onSubmit={form.handleSubmit} >
I think I know what the issue is, will fix tomorrow
Thank you!!!
@adaboese fixed
I am not sure what's the problem here, but I am following the README.md.