Capítulo 23 de 29
Three recurring issues cover most of what goes wrong: an uncontrolled-to-controlled input warning from missing defaultValues, a field value typed as unknown from an overly complex form shape, and a TypeScript "excessively deep type instantiation" error tied to the library's own generic machinery.
defaultValues: leaving a field's default out of defaultValues means it starts undefined, which React reports as an uncontrolled-to-controlled transition the first time a value arrives. Fix: always seed every field's default explicitly in useForm's defaultValues (see ch006).field.state.value typed as unknown: usually a sign the form's overall type shape has gotten too complex for inference to fully resolve. Fix: break the form into smaller pieces (form groups, ch012; composition, ch020) or add more specific typing; casting with as is a workaround, not a fix.defaultValues completeness before anything else — it is almost always the cause.unknown-typed field values are a complexity signal, not a bug to cast away — restructure the form (ch012 Form Groups, ch020 Form Composition) rather than reaching for as as a permanent fix.defaultValues completeness first matters.strict/version requirements underlying these type-inference failure modes.