Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Conform · Type Alias

SubmissionResult

SubmissionResult is the result shape Conform uses to synchronize a processed form submission with form state. It can include the processed submission, an applied target value, validation errors, and a reset instruction.

How it works

SubmissionResult describes the result that Conform uses to synchronize form state after processing a submission. It includes the processed submission and can additionally carry a target value, validation error, and reset instruction.

Syntax

type SubmissionResult<ErrorShape = string[]> = {
  submission: Submission;
  targetValue?: Record<string, unknown>;
  error?: FormError<ErrorShape> | null;
  reset?: boolean;
};

Returns

A SubmissionResult object containing the processed submission and optional target value, error, and reset state.

Key points

  • The alias models the complete result object returned for form-state handling.
  • Its submission member contains the processed submission.
  • targetValue lets the form apply a value distinct from the submitted payload.
  • error carries validation information when the result includes it.
  • reset controls whether Conform restores the form's initial state.

Common mistakes

  • Use SubmissionResult with useForm's lastResult option to synchronize state from a server response.

Example: Typing a submission result

import type { SubmissionResult } from '@conform-to/react/future';

const result: SubmissionResult = {
  submission: {
    status: 'success',
    payload: { email: 'dev@example.com' },
    error: null,
    reply() {
      return new Response(null);
    },
  },
};

This annotates a processed form result with the SubmissionResult type.

When to use it

Synchronize server validation

A server action returns validation feedback after processing submitted FormData.

Apply or reset form values

A successful operation should replace or clear the value currently shown by the form.

Transport structured errors

A result must preserve the parsed submission while carrying field or form errors.

Interview questions

QWhat does SubmissionResult represent?

SubmissionResult represents the processed result of a form submission. It can contain the parsed submission plus optional targetValue, error, and reset fields.

Follow-up: How can a server result reach a form? Pass it as the lastResult option to useForm so Conform can synchronize the form state.

QWhat is stored in the submission property?

The submission property contains the processed submission object. Its payload may be changed when fields are hidden or files are removed.

Follow-up: Why might the payload differ from the original request? The report utility can strip files or hide selected fields before producing the result.

QWhat optional state controls can SubmissionResult provide?

error carries validation information when supplied, while reset indicates that the form should return to its initial state. targetValue supplies a different value to apply to the form.

Follow-up: When is reset useful? It supports responses such as successfully creating an entry and then clearing the form.

  • report
  • useForm
  • defineCustomState
  • Submission

Source: report - conform.guide. Checked 2026-10-15.