defineConfig
defineConfig is the second item in the array returned by setupForm.
Tip
defineConfig is used throughout this documentation, but since setupForm() returns an array, you can name it anything.
defineConfig for nested structures
For flat form structures, <Form<TModel>> is enough as types flow naturally from Form<TModel> into the configuration. With nested structures, however:
You have two options: use dot notation keys — account.username — or use defineConfig if you prefer your config to mirror the shape of your data model, which is typically the case when using the built-in section type.
defineConfig for reusable configuration
Another common use case for defineConfig is to define configurations once and import them wherever needed, while still preserving the same field mapping and typing rules.
form.setup.ts
login.form.ts
LoginPage.tsx

