Episode 2 — React Frontend Architecture NextJS / 2.15 — Advanced Forms and Validation
2.15.a — React Hook Form: efficient form handling
Learning outcomes
- Explain why RHF reduces re-renders compared to fully controlled one-state-per-keystroke patterns.
- Use
register,handleSubmit, andformStateeffectively without fighting the library. - Choose between native registration and
Controllerfor third-party inputs. - Integrate validation resolvers (Zod) cleanly and handle server errors.
Mental model: uncontrolled by default
React Hook Form leans on uncontrolled inputs using refs under the hood. Validation and submission orchestration happen without needing React state for every keystroke—though you can still observe values when needed.
import { useForm } from "react-hook-form";
type FormValues = {
email: string;
password: string;
};
export function LoginForm() {
const {
register,
handleSubmit,
formState: { errors, isSubmitting },
} = useForm<FormValues>({
defaultValues: { email: "", password: "" },
});
const onSubmit = async (values: FormValues) => {
// call API
console.log(values);
};
return (
<form onSubmit={handleSubmit(onSubmit)} noValidate>
<label htmlFor="email">Email</label>
<input id="email" type="email" {...register("email", { required: "Required" })} />
{errors.email && <p role="alert">{errors.email.message}</p>}
<label htmlFor="password">Password</label>
<input id="password" type="password" {...register("password", { required: "Required" })} />
{errors.password && <p role="alert">{errors.password.message}</p>}
<button disabled={isSubmitting} type="submit">
{isSubmitting ? "Signing in…" : "Sign in"}
</button>
</form>
);
}
register rules vs schema resolver
You can validate with inline rules, but teams commonly standardize on Zod + zodResolver for one schema shared across client and server.
Rule of thumb:
- Small forms: inline rules can be fine.
- Product forms: resolver + schema for maintainability.
watch vs useWatch
watch("field") at the top level can cause broad rerenders. Prefer:
useWatch({ control, name: "field" })inside a child component to localize subscriptions.- Or derive values at submit time when possible.
Controller for third-party components
When a component does not forward refs or expects value/onChange, wrap it:
import { Controller, useForm } from "react-hook-form";
export function BirthdayPicker() {
const { control } = useForm<{ birthday: string }>({ defaultValues: { birthday: "" } });
return (
<Controller
name="birthday"
control={control}
render={({ field, fieldState }) => (
<div>
{/* pretend FancyDateInput is third-party */}
<FancyDateInput value={field.value} onChange={field.onChange} />
{fieldState.error && <p>{fieldState.error.message}</p>}
</div>
)}
/>
);
}
function FancyDateInput(props: { value: string; onChange: (v: string) => void }) {
return <input value={props.value} onChange={(e) => props.onChange(e.target.value)} />;
}
Submission: idempotency and failure mapping
- Disable submit while
isSubmittingis true. - Map server validation failures to
setErroron specific fields. - Decide UX for partial success (multi-step forms).
Field arrays (useFieldArray)
Arrays are where forms become databases-in-miniature:
- Provide stable keys (
idfrom server) rather than only index keys when reordering. - Test insert/remove/reorder with keyboard focus expectations.
Testing strategy
- Unit test schema with Zod directly.
- Component tests: submit happy path + invalid path + server error mapping.
Appendix — Scenario bank (basic → advanced)
Each scenario is a mini design review: what users see, what breaks, what you change, what you say in an interview. Cover five per day and narrate fixes out loud.
RHF-001 — React Hook Form scenario #1
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
13 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-002 — React Hook Form scenario #2
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
26 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-003 — React Hook Form scenario #3
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
39 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-004 — React Hook Form scenario #4
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
52 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-005 — React Hook Form scenario #5
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
65 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-006 — React Hook Form scenario #6
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
78 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-007 — React Hook Form scenario #7
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
91 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-008 — React Hook Form scenario #8
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
104 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-009 — React Hook Form scenario #9
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
117 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-010 — React Hook Form scenario #10
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
10 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-011 — React Hook Form scenario #11
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
23 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-012 — React Hook Form scenario #12
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
36 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-013 — React Hook Form scenario #13
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
49 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-014 — React Hook Form scenario #14
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
62 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-015 — React Hook Form scenario #15
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
75 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-016 — React Hook Form scenario #16
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
88 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-017 — React Hook Form scenario #17
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
101 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-018 — React Hook Form scenario #18
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
114 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-019 — React Hook Form scenario #19
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
7 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-020 — React Hook Form scenario #20
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
20 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-021 — React Hook Form scenario #21
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
33 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-022 — React Hook Form scenario #22
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
46 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-023 — React Hook Form scenario #23
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
59 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-024 — React Hook Form scenario #24
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
72 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-025 — React Hook Form scenario #25
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
85 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-026 — React Hook Form scenario #26
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
98 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-027 — React Hook Form scenario #27
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
111 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-028 — React Hook Form scenario #28
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
4 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-029 — React Hook Form scenario #29
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
17 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-030 — React Hook Form scenario #30
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
30 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-031 — React Hook Form scenario #31
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
43 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-032 — React Hook Form scenario #32
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
56 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-033 — React Hook Form scenario #33
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
69 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-034 — React Hook Form scenario #34
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
82 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-035 — React Hook Form scenario #35
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
95 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-036 — React Hook Form scenario #36
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
108 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-037 — React Hook Form scenario #37
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
1 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-038 — React Hook Form scenario #38
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
14 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-039 — React Hook Form scenario #39
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
27 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-040 — React Hook Form scenario #40
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
40 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-041 — React Hook Form scenario #41
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
53 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-042 — React Hook Form scenario #42
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
66 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-043 — React Hook Form scenario #43
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
79 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-044 — React Hook Form scenario #44
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
92 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-045 — React Hook Form scenario #45
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
105 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-046 — React Hook Form scenario #46
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
118 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-047 — React Hook Form scenario #47
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
11 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-048 — React Hook Form scenario #48
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
24 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-049 — React Hook Form scenario #49
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
37 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-050 — React Hook Form scenario #50
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
50 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-051 — React Hook Form scenario #51
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
63 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-052 — React Hook Form scenario #52
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
76 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-053 — React Hook Form scenario #53
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
89 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-054 — React Hook Form scenario #54
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
102 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-055 — React Hook Form scenario #55
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
115 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-056 — React Hook Form scenario #56
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
8 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-057 — React Hook Form scenario #57
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
21 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-058 — React Hook Form scenario #58
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
34 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-059 — React Hook Form scenario #59
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
47 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-060 — React Hook Form scenario #60
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
60 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-061 — React Hook Form scenario #61
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
73 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-062 — React Hook Form scenario #62
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
86 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-063 — React Hook Form scenario #63
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
99 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-064 — React Hook Form scenario #64
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
112 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-065 — React Hook Form scenario #65
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
5 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-066 — React Hook Form scenario #66
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
18 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-067 — React Hook Form scenario #67
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
31 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-068 — React Hook Form scenario #68
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
44 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-069 — React Hook Form scenario #69
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
57 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-070 — React Hook Form scenario #70
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
70 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-071 — React Hook Form scenario #71
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
83 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-072 — React Hook Form scenario #72
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
96 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-073 — React Hook Form scenario #73
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
109 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-074 — React Hook Form scenario #74
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
2 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-075 — React Hook Form scenario #75
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
15 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-076 — React Hook Form scenario #76
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
28 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-077 — React Hook Form scenario #77
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
41 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-078 — React Hook Form scenario #78
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
54 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-079 — React Hook Form scenario #79
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
67 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-080 — React Hook Form scenario #80
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
80 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-081 — React Hook Form scenario #81
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
93 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-082 — React Hook Form scenario #82
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
106 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-083 — React Hook Form scenario #83
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
119 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-084 — React Hook Form scenario #84
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
12 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-085 — React Hook Form scenario #85
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
25 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-086 — React Hook Form scenario #86
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
38 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-087 — React Hook Form scenario #87
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
51 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-088 — React Hook Form scenario #88
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
64 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-089 — React Hook Form scenario #89
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
77 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-090 — React Hook Form scenario #90
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
90 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-091 — React Hook Form scenario #91
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
103 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-092 — React Hook Form scenario #92
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
116 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-093 — React Hook Form scenario #93
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
9 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-094 — React Hook Form scenario #94
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
22 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-095 — React Hook Form scenario #95
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
35 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-096 — React Hook Form scenario #96
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
48 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-097 — React Hook Form scenario #97
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
61 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-098 — React Hook Form scenario #98
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
74 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-099 — React Hook Form scenario #99
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
87 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-100 — React Hook Form scenario #100
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
100 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-101 — React Hook Form scenario #101
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
113 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-102 — React Hook Form scenario #102
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
6 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-103 — React Hook Form scenario #103
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
19 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-104 — React Hook Form scenario #104
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
32 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-105 — React Hook Form scenario #105
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
45 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-106 — React Hook Form scenario #106
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
58 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-107 — React Hook Form scenario #107
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
71 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-108 — React Hook Form scenario #108
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
84 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-109 — React Hook Form scenario #109
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
97 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-110 — React Hook Form scenario #110
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
110 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-111 — React Hook Form scenario #111
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
3 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-112 — React Hook Form scenario #112
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
16 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-113 — React Hook Form scenario #113
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
29 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-114 — React Hook Form scenario #114
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
42 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-115 — React Hook Form scenario #115
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
55 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-116 — React Hook Form scenario #116
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
68 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-117 — React Hook Form scenario #117
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
81 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-118 — React Hook Form scenario #118
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
94 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-119 — React Hook Form scenario #119
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
107 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-120 — React Hook Form scenario #120
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
0 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-121 — React Hook Form scenario #121
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
13 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-122 — React Hook Form scenario #122
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
26 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-123 — React Hook Form scenario #123
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
39 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-124 — React Hook Form scenario #124
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
52 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-125 — React Hook Form scenario #125
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
65 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-126 — React Hook Form scenario #126
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
78 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-127 — React Hook Form scenario #127
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
91 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-128 — React Hook Form scenario #128
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
104 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-129 — React Hook Form scenario #129
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
117 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-130 — React Hook Form scenario #130
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
10 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-131 — React Hook Form scenario #131
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
23 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-132 — React Hook Form scenario #132
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
36 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-133 — React Hook Form scenario #133
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
49 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-134 — React Hook Form scenario #134
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
62 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-135 — React Hook Form scenario #135
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
75 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-136 — React Hook Form scenario #136
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
88 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-137 — React Hook Form scenario #137
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
101 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-138 — React Hook Form scenario #138
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
114 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-139 — React Hook Form scenario #139
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
7 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-140 — React Hook Form scenario #140
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
20 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-141 — React Hook Form scenario #141
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
33 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-142 — React Hook Form scenario #142
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
46 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-143 — React Hook Form scenario #143
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
59 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-144 — React Hook Form scenario #144
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
72 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-145 — React Hook Form scenario #145
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
85 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-146 — React Hook Form scenario #146
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
98 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-147 — React Hook Form scenario #147
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
111 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-148 — React Hook Form scenario #148
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
4 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-149 — React Hook Form scenario #149
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
17 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-150 — React Hook Form scenario #150
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
30 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-151 — React Hook Form scenario #151
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
43 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Document reset policy: clear vs preserve UX for multi-step flows.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-152 — React Hook Form scenario #152
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
56 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Prefer
registerfor native inputs; reserveControllerfor third-party widgets. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-153 — React Hook Form scenario #153
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
69 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Replace broad watch with
useWatchscoped to subtree or subscribe selectively. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-154 — React Hook Form scenario #154
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
82 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Support no-JS baseline where required; keep server validation authoritative.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-155 — React Hook Form scenario #155
- Level: Advanced
- User-visible symptom: validation flicker, double submit, or lost input after
95 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Use
useFieldArrayhelpers and stable keys; test focus management. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-156 — React Hook Form scenario #156
- Level: Advanced+
- User-visible symptom: validation flicker, double submit, or lost input after
108 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Provide complete
defaultValues; align keys withregisternames and nested paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-157 — React Hook Form scenario #157
- Level: Beginner
- User-visible symptom: validation flicker, double submit, or lost input after
1 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Separate display formatting from stored value using RHF transforms carefully.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.
RHF-158 — React Hook Form scenario #158
- Level: Beginner+
- User-visible symptom: validation flicker, double submit, or lost input after
14 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Align Zod path keys with RHF
namestrings including bracket paths. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Treat resolver output as the single validation boundary for client UX.
RHF-159 — React Hook Form scenario #159
- Level: Intermediate
- User-visible symptom: validation flicker, double submit, or lost input after
27 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Field arrays implemented without stable
idkeys causing focus jumps. - Primary remediation: Disable submit while submitting; use
resetwith explicit options after success. - Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: RHF unregisters subscriptions unless you watch—scope watch tightly.
RHF-160 — React Hook Form scenario #160
- Level: Intermediate+
- User-visible symptom: validation flicker, double submit, or lost input after
40 msasync checks. - Form architecture symptom: state thrashes, unnecessary renders, or impossible-to-test validation scattered in JSX.
- Root cause class: Re-registering inputs on every render due to unstable rules objects passed inline.
- Primary remediation: Hoist validation rules; memoize resolver options when needed; measure watch scope.
- Accessibility check: associate errors with fields via
aria-describedby/aria-invalid; do not rely on color alone. - Interview one-liner: Submit handlers should be idempotent; guard with submitting state.