Example:
function Form() {
const [isPending, onSubmit] = useFormActionHandler((formData, reset) => {
if (formData.get('condition') === 'X') {
reset();
}
// ...
});
return (
<form onSubmit={onSubmit}>
{...}
</form>
);
}