- Added
useActionState
to replaceuseFormState
and addedpending
value (#28491).
- Added support for async functions to be passed to
startTransition
. useTransition
now triggers the nearest error boundary instead of a global error.- Added
useOptimistic
, a new Hook for handling optimistic UI updates. It optimistically updates the UI before receiving confirmation from a server or external source.
- Added support for passing async functions to the
action
prop on<form>
. When the function passed toaction
is marked with'use server'
, the form is progressively enhanced. - Added
useFormStatus
, a new Hook for checking the submission state of a form. - Added
useFormState
, a new Hook for updating state upon form submission. When the function passed touseFormState
is marked with'use server'
, the update is progressively enhanced.