Type Alias FormAction<TFormValues>

FormAction<TFormValues>: {
    field: keyof TFormValues;
    type: "SET_FIELD";
    value: TFormValues[keyof TFormValues];
} | {
    errors: Partial<Record<keyof TFormValues, string>>;
    type: "SET_ERRORS";
} | {
    type: "RESET_FORM";
    values: TFormValues;
}

Action types for updating form state in the reducer

Type Parameters

  • TFormValues