FAQ
Short answers for the most frequent adoption questions. If your issue is symptom-based, go straight to Troubleshooting.
Which package should I install: hookform-action, standalone, or core?
SetupUse hookform-action for Next.js Server Actions. Use hookform-action-standalone for Vite/Remix/Astro/SPA apps. Use core only for custom adapters.
Is withZod required?
ValidationNo. It is optional but recommended. It gives typed server validation, a standard error shape, and schema auto-detection in useActionForm.
If I already use withZod, do I still need schema in useActionForm?
ValidationUsually no. The schema is auto-detected. Pass schema only when you want to override behavior explicitly.
What is the default error contract?
ErrorsReturn errors as { errors: Record<string, string[]> } so field mapping works out of the box.
What is the difference between mode and validationMode?
Validationmode is the native React Hook Form validation strategy. validationMode controls when hookform-action runs client-side schema validation.
Should submit buttons use isPending or isSubmitting?
StatePrefer isPending for UI state during the full server round-trip. isSubmitting can be narrower depending on the flow.
What is the difference between formState.errors and formState.submitErrors?
Errorserrors is RHF-ready data for rendering. submitErrors is the raw error record returned by your action.
Why are old values restored when the form mounts?
PersistenceIf persistKey is set, persisted data takes precedence over defaultValues. Use scoped keys and clear persisted drafts when needed.
When is persisted state cleared automatically?
PersistencePersisted data is cleared on successful submission. Failed submissions keep the draft for recovery.
Why is optimistic undefined?
OptimisticYou need optimisticKey and optimisticData. optimisticInitial is recommended for predictable first render behavior.
Does optimistic rollback happen automatically?
OptimisticYes. Rollback runs on mapped action errors and thrown exceptions. Manual rollback() is also available.
Does standalone provide formAction too?
StandaloneNo. In standalone mode, you pass submit and call handleSubmit(). formAction is Next.js adapter specific.
Still blocked?
Use the troubleshooting checklist to debug by symptom: submit not firing, field errors not showing, stale persisted values, optimistic rollback issues, and upload edge cases.
Open Troubleshooting →