Next.js Discord

Discord Forum

Unit test trouble with useFormState

Unanswered
Masai Lion posted this in #help-forum
Open in Discord
Masai LionOP
Been following this video to make a form https://youtu.be/dDpZfOQBMaU?si=blq-nqGunwDWpr7i
Trying to add unit tests now to the form component and getting this error when running them.
Error: Uncaught [TypeError: (0 , _reactdom.useFormState) is not a function or its return value is not iterable]

Any ideas how to fix this? Using Jest to do my unit tests.

1 Reply

British Shorthair
@Masai Lion Any updates pn this?