Capítulo 18 de 29
There is no adapter layer for UI kits — every integration is the same render-prop pattern, destructuring state/handleChange/handleBlur from form.Field's children function and mapping them onto whatever prop names the target component expects.
state.value → the component's value prop, handleChange → its change handler, handleBlur → its blur handler.Checkbox uses onCheckedChange instead of onChange, so the wiring function's signature changes slightly, but the pattern itself doesn't.<Field
name="username"
children={({ state, handleChange, handleBlur }) => (
<TextField
value={state.value}
onChange={(e) => handleChange(e.target.value)}
onBlur={handleBlur}
placeholder="Enter username"
/>
)}
/>
TextField — the same shape works for shadcn/ui's Input, just swap the component and match its specific event signature.@tanstack/form-mui-style adapter package — there isn't one, and there doesn't need to be; the render-prop pattern is the integration mechanism.onCheckedChange, onValueChange, etc.) — these are the only places the wiring code actually differs between UI libraries.TextField/Checkbox/etc. components (ch020 Form Composition) rather than repeating the destructuring at every call site.createFormHook's fieldComponents, the recommended place to centralize this wiring.