Capítulo 29 de 29
Every non-React framework adapter exposes the same form-instance-plus-field-render shape as React, with the only real variation being the idiomatic way each framework does reactive templating (a hook, a composable, a directive, or a controller class) and its own template-binding syntax.
| Framework | Package | Form-creation call | Field mechanism |
|---|---|---|---|
| React | @tanstack/react-form | useForm(...) | form.Field render-prop |
| Preact | @tanstack/preact-form | useForm(...) (identical signature to React) | form.Field render-prop |
| Vue | @tanstack/vue-form | useForm(...) (composable) | form.Field with a scoped slot (<template v-slot="{ field }">) |
| Solid | @tanstack/solid-form | createForm(...) | form.Field with a children function |
| Svelte | @tanstack/svelte-form | createForm(() => ({...})) | form.Field with a {#snippet children(field)} block |
| Angular | @tanstack/angular-form | injectForm(...) | TanStackField structural directive ([tanstackField]) |
| Lit | @tanstack/lit-form | new TanStackFormController(this, {...}) | this.#form.field({ name }, renderCallback) returning an html template |
useForm/form.Field signatures, just imported from @tanstack/preact-form; migrating between the two is close to a find-and-replace on the import path.field object React gets via a render prop — the underlying field.state/field.handleChange/field.handleBlur API is unchanged.createForm mirrors React's useForm closely (same form.Field children-function pattern) but is named differently to match Solid's own primitive-naming convention (createX instead of useX).injectForm() (Angular's DI-based composition API) pairs with a TanStackField directive applied in the template, rather than a component with a children function.TanStackFormController class instance is created against this (the LitElement), and each field is registered imperatively via .field({ name }, callback), with the callback returning a lit-html template. Lit's docs explicitly note you are responsible for updating the element and form yourself, unlike the more automatic reactivity in the other adapters.field object's shape; migrating to/from Angular or Lit is the largest structural jump.https://tanstack.com/form/latest/llms.txt).