Form Actions and useActionState in React 19
Before React 19, a form needed state for values, errors, loading and the response. useActionState folds most of that into one hook. The signature const [state, formAction, isPending] = useActionState(actionFn, initialState); // actionFn(previousState, formData...