Advanced

Form Composer Demo

Compose multiple forms together and share validation across them. This demo shows how the form composer lets you orchestrate complex multi-form workflows from a single registry.

Docs

Composer

Demo of composing billing + shipping fields in a single form

What is the Composer?

The composer() utility lets you combine multiple forms — each with its own fields, rules, and validation — into a single submission workflow. Perfect for multi-step checkout flows, wizards, or complex dashboards.

import { composer } from 'mobx-react-form';

const checkout = composer({
  billing,
  shipping,
});

checkout.validate()
  .then(({ valid, errors, values }) => {
    if (valid) submitAll(values);
  });

1Billing Details

2Shipping Details