- Refine and expand best practices for: - AI SDK - Date-fns - Next.js - Radix UI - React - React Hook Form - Stripe - Tailwind CSS - TypeScript - Zustand - Improve guidelines with more specific and actionable recommendations - Enhance type safety and performance suggestions across different technologies
10 lines
420 B
Plaintext
10 lines
420 B
Plaintext
---
|
|
description: Best practices for form handling with React Hook Form
|
|
globs: **/*.{ts,tsx}
|
|
alwaysApply: false
|
|
---
|
|
|
|
- Use the `useForm` hook for efficient form state management.
|
|
- Implement validation using Zod with `@hookform/resolvers` for type-safe form validation.
|
|
- Utilize the `Controller` component for integrating with custom inputs.
|
|
- Leverage the `useFormContext` hook for sharing form state across components. |