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.