useFormState
The earlier name of useActionState, from React DOM canary releases before React 19.
In more detail
React 19 renamed it to useActionState, moved it to the react package and added the isPending value. Code written for Next.js 14 may still import it.
Related terms
- useActionState — The React hook that wraps an Action and returns its latest result, a function to trigger it, and an isPending flag.
Taught in
- Action State: useActionState & Optimistic Form UI — Next.js 15 & Modern App Router Architecture