79276258

Date: 2024-12-12 18:55:52
Score: 0.5
Natty:
Report link

It turns out that useFormState works by adapting to the function you pass inside. So if you pass a test function with nothing inside of it yet, it would have no arguments expected. So the solution is to define the function with necessary arguments (e.g. "_: any, formData: FormData"), and when you pass an argument when you call formAction, it won't raise an error.

Reasons:
  • Whitelisted phrase (-1): solution is
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Pixtane