79511564

Date: 2025-03-15 18:03:28
Score: 1.5
Natty:
Report link

Below is what I did, thanks to @classikh! It fixed my issue:

    // Define your form.
  const form = useForm<z.infer<typeof formSchema>>({
    resolver: zodResolver(formSchema), 
    defaultValues: {
      email: '', 
    },
    values: {
      email: user?.email ?? '', 
    }
  })

In above code 'user' is coming from my hook which gets populated when user is fetched.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Has code block (-0.5):
  • User mentioned (1): @classikh
  • Low reputation (0.5):
Posted by: Frontend Backend Bookend