Skip to main content
友田 陽大

Category

Reactフォーム実装ガイド(React Hook Form / Zod / shadcn-ui / Server Actions)

フォームは「状態・検証・アクセシビリティ」が合流する設計対象です。本クラスタは、React Hook Form を軸に、Zodによる型・検証・文言の単一化(DRY)、非制御×購読の隔離による再レンダリング最小化、shadcn/uiでのアクセシブルなフォーム部品設計、Next.js Server Actions(useActionState)でのクライアント/サーバー二重検証とプログレッシブ・エンハンスメント、useFieldArrayでの請求明細・複数ステップウィザード、そしてFormik/TanStack Formとの選定・移行までを扱います。経済産業大臣賞を受賞したB2B SaaSの基幹業務フォーム(明細・承認・設定画面)を本番運用した知見を根拠に、型安全・a11y・二重送信防止・テスト容易性を担保した本番品質のフォーム設計を、公式ドキュメントに忠実な実コードで体系化します。

6 articles in total

Foundational guide

Foundational guide (start here)

React
React Hook Form
Zod
TypeScript
Next.js

The Complete React Hook Form Guide [2026 Latest, v7.80] — Type-Safe Forms, Re-Render Design, a11y, Dynamic Fields, Server Actions, Testing

Using the latest official docs (React Hook Form v7.80 / @hookform/resolvers v5 / Zod 4) as the primary source, type-safe form design explained at production quality. zodResolver integration, formState's Proxy subscription, re-render design with watch / useWatch / useFormState, FormProvider and type-safe reusable fields, useFieldArray's dynamic line items, async defaultValues, a11y, double validation with Server Actions, and testing — so you can judge 'when and how to use' with real code.

26 min read

Related practical articles